Index: sky/sdk/lib/framework/app.dart |
diff --git a/sky/sdk/lib/framework/app.dart b/sky/sdk/lib/framework/app.dart |
index 7785088e6970708ec7fb55c78fe63a25710012fd..701821c24f4a2017dd5cf0bd4c1419e775fe2718 100644 |
--- a/sky/sdk/lib/framework/app.dart |
+++ b/sky/sdk/lib/framework/app.dart |
@@ -16,7 +16,7 @@ class PointerState { |
class AppView { |
- AppView([RenderBox root = null]) { |
+ AppView({ RenderBox root: null, RenderView renderViewOverride }) { |
assert(_app == null); |
_app = this; |
@@ -25,10 +25,15 @@ class AppView { |
scheduler.init(); |
scheduler.addPersistentFrameCallback(_beginFrame); |
- _renderView = new RenderView(child: root); |
- _renderView.attach(); |
- _renderView.rootConstraints = _viewConstraints; |
- _renderView.scheduleInitialLayout(); |
+ if (renderViewOverride == null) { |
+ _renderView = new RenderView(child: root); |
+ _renderView.attach(); |
+ _renderView.rootConstraints = _viewConstraints; |
+ _renderView.scheduleInitialLayout(); |
+ } else { |
+ _renderView = renderViewOverride; |
+ } |
+ assert(_renderView != null); |
assert(_app == this); |
} |