Index: sky/sdk/lib/framework/fn2.dart |
diff --git a/sky/sdk/lib/framework/fn2.dart b/sky/sdk/lib/framework/fn2.dart |
index fd39b82050935f4e5c8846e7709a912159eb73fb..540566963cde71d230207b2a5d2655d0a54d4a5a 100644 |
--- a/sky/sdk/lib/framework/fn2.dart |
+++ b/sky/sdk/lib/framework/fn2.dart |
@@ -441,6 +441,26 @@ class SizeObserver extends OneChildRenderObjectWrapper { |
} |
} |
+// TODO(jackson) need a mechanism for marking the RenderCustomPaint as needing paint |
+class CustomPaint extends OneChildRenderObjectWrapper { |
+ RenderCustomPaint root; |
+ final CustomPaintCallback callback; |
+ |
+ CustomPaint({ this.callback, UINode child, Object key }) |
+ : super(child: child, key: key); |
+ |
+ RenderCustomPaint createNode() => new RenderCustomPaint(callback: callback); |
+ |
+ void syncRenderObject(CustomPaint old) { |
+ super.syncRenderObject(old); |
+ root.callback = callback; |
+ } |
+ |
+ void _remove() { |
+ root.callback = null; |
+ super._remove(); |
+ } |
+} |
final List<UINode> _emptyList = new List<UINode>(); |