mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Expose the RenderView root through the AppView, so that you can change it.
Also, attach the RenderView so that it actually updates during a flush layout. R=abarth@chromium.org Review URL: https://codereview.chromium.org/1149063007
This commit is contained in:
parent
f1b7dff0c7
commit
acdebf5520
@ -12,6 +12,7 @@ class AppView {
|
||||
sky.view.setBeginFrameCallback(_beginFrame);
|
||||
|
||||
_renderView = new RenderView(root: root);
|
||||
_renderView.attach();
|
||||
_renderView.layout(newWidth: sky.view.width, newHeight: sky.view.height);
|
||||
|
||||
sky.view.scheduleFrame();
|
||||
@ -19,6 +20,11 @@ class AppView {
|
||||
|
||||
RenderView _renderView;
|
||||
|
||||
RenderBox get root => _renderView.root;
|
||||
void set root(RenderBox value) {
|
||||
_renderView.root = value;
|
||||
}
|
||||
|
||||
void _beginFrame(double timeStamp) {
|
||||
RenderNode.flushLayout();
|
||||
_renderView.paintFrame();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user