Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1643)

Unified Diff: sky/sdk/lib/framework/app.dart

Issue 1160233004: Improve the RenderObject.toString() logic so that there's not blank lines everywhere and to general… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fix matrix output, comment out debug line Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/stocks2/lib/stock_app.dart ('k') | sky/sdk/lib/framework/components2/scaffold.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/app.dart
diff --git a/sky/sdk/lib/framework/app.dart b/sky/sdk/lib/framework/app.dart
index e8135bdedb62e4b90debf293107435317f6eb858..8f4e7ccb15b846ef5ff8bc339161b1cb3bca7a79 100644
--- a/sky/sdk/lib/framework/app.dart
+++ b/sky/sdk/lib/framework/app.dart
@@ -33,11 +33,15 @@ class AppView {
Map<int, PointerState> _stateForPointer = new Map<int, PointerState>();
+ Function onFrame;
+
RenderBox get root => _renderView.child;
void set root(RenderBox value) {
_renderView.child = value;
}
void _beginFrame(double timeStamp) {
+ if (onFrame != null)
+ onFrame();
RenderObject.flushLayout();
_renderView.paintFrame();
}
@@ -92,4 +96,11 @@ class AppView {
for (RenderObject node in result.path.reversed)
node.handleEvent(event);
}
+
+ String toString() => 'Render Tree:\n${_renderView}';
+
+ void debugDumpRenderTree() {
+ toString().split('\n').forEach(print);
+ }
+
}
« no previous file with comments | « sky/examples/stocks2/lib/stock_app.dart ('k') | sky/sdk/lib/framework/components2/scaffold.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698