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:
Hixie 2015-05-27 10:42:02 -07:00
parent f1b7dff0c7
commit acdebf5520

View File

@ -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();