Index: sky/sdk/lib/framework/rendering/box.dart |
diff --git a/sky/sdk/lib/framework/rendering/box.dart b/sky/sdk/lib/framework/rendering/box.dart |
index abc6c65e399108590b5862507c5365213fde5863..8328b2d319fc8951bdc84745c23a060505ae0422 100644 |
--- a/sky/sdk/lib/framework/rendering/box.dart |
+++ b/sky/sdk/lib/framework/rendering/box.dart |
@@ -287,7 +287,7 @@ class RenderProxyBox extends RenderBox with RenderObjectWithChildMixin<RenderBox |
super.hitTestChildren(result, position: position); |
} |
- void paint(RenderObjectDisplayList canvas) { |
+ void paint(sky.Canvas canvas) { |
if (child != null) |
child.paint(canvas); |
} |
@@ -452,7 +452,7 @@ class RenderOpacity extends RenderProxyBox { |
markNeedsPaint(); |
} |
- void paint(RenderObjectDisplayList canvas) { |
+ void paint(sky.Canvas canvas) { |
if (child != null) { |
int a = (_opacity * 255).round(); |
@@ -477,7 +477,7 @@ class RenderOpacity extends RenderProxyBox { |
class RenderClipRect extends RenderProxyBox { |
RenderClipRect({ RenderBox child }) : super(child); |
- void paint(RenderObjectDisplayList canvas) { |
+ void paint(sky.Canvas canvas) { |
if (child != null) { |
canvas.save(); |
canvas.clipRect(new Rect.fromSize(size)); |
@@ -490,7 +490,7 @@ class RenderClipRect extends RenderProxyBox { |
class RenderClipOval extends RenderProxyBox { |
RenderClipOval({ RenderBox child }) : super(child); |
- void paint(RenderObjectDisplayList canvas) { |
+ void paint(sky.Canvas canvas) { |
if (child != null) { |
Rect rect = new Rect.fromSize(size); |
canvas.saveLayer(rect, new Paint()); |
@@ -564,9 +564,9 @@ class RenderPadding extends RenderBox with RenderObjectWithChildMixin<RenderBox> |
padding.top + child.size.height + padding.bottom)); |
} |
- void paint(RenderObjectDisplayList canvas) { |
+ void paint(sky.Canvas canvas) { |
if (child != null) |
- canvas.paintChild(child, child.parentData.position); |
+ paintChild(canvas, child, child.parentData.position); |
} |
void hitTestChildren(HitTestResult result, { Point position }) { |
@@ -664,7 +664,7 @@ class RenderImage extends RenderBox { |
size = _sizeForConstraints(constraints); |
} |
- void paint(RenderObjectDisplayList canvas) { |
+ void paint(sky.Canvas canvas) { |
if (_image == null) return; |
bool needsScale = size.width != _image.width || size.height != _image.height; |
if (needsScale) { |
@@ -699,7 +699,7 @@ class RenderDecoratedBox extends RenderProxyBox { |
markNeedsPaint(); |
} |
- void paint(RenderObjectDisplayList canvas) { |
+ void paint(sky.Canvas canvas) { |
assert(size.width != null); |
assert(size.height != null); |
_painter.paint(canvas, new Rect.fromSize(size)); |
@@ -769,7 +769,7 @@ class RenderTransform extends RenderProxyBox { |
super.hitTestChildren(result, position: transformed); |
} |
- void paint(RenderObjectDisplayList canvas) { |
+ void paint(sky.Canvas canvas) { |
canvas.save(); |
canvas.concat(_transform.storage); |
super.paint(canvas); |
@@ -831,7 +831,7 @@ class RenderCustomPaint extends RenderProxyBox { |
super.attach(); |
} |
- void paint(RenderObjectDisplayList canvas) { |
+ void paint(sky.Canvas canvas) { |
assert(_callback != null); |
_callback(canvas, size); |
super.paint(canvas); |
@@ -909,16 +909,17 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox> |
return true; |
} |
- void paint(RenderObjectDisplayList canvas) { |
+ void paint(sky.Canvas canvas) { |
if (child != null) |
- canvas.paintChild(child, Point.origin); |
+ paintChild(canvas, child, Point.origin); |
} |
void paintFrame() { |
RenderObject.debugDoingPaint = true; |
- RenderObjectDisplayList canvas = new RenderObjectDisplayList(sky.view.width, sky.view.height); |
+ sky.PictureRecorder recorder = new sky.PictureRecorder(); |
+ sky.Canvas canvas = recorder.beginRecording(sky.view.width, sky.view.height); |
paint(canvas); |
- sky.view.picture = canvas.endRecording(); |
+ sky.view.picture = recorder.endRecording(); |
RenderObject.debugDoingPaint = false; |
} |
@@ -942,11 +943,11 @@ abstract class RenderBoxContainerDefaultsMixin<ChildType extends RenderBox, Pare |
} |
} |
- void defaultPaint(RenderObjectDisplayList canvas) { |
+ void defaultPaint(sky.Canvas canvas) { |
RenderBox child = firstChild; |
while (child != null) { |
assert(child.parentData is ParentDataType); |
- canvas.paintChild(child, child.parentData.position); |
+ paintChild(canvas, child, child.parentData.position); |
child = child.parentData.nextSibling; |
} |
} |