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

Unified Diff: sky/sdk/lib/framework/rendering/object.dart

Issue 1190123003: Decouple Canvas from DisplayList and map Picture and PictureRecorder more directly to their Skia co… (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
Index: sky/sdk/lib/framework/rendering/object.dart
diff --git a/sky/sdk/lib/framework/rendering/object.dart b/sky/sdk/lib/framework/rendering/object.dart
index 4f8173237604b63eea1b376d750bae5881314ec0..b528a598fb3e075b0bc8b27f31b355bfde93b62f 100644
--- a/sky/sdk/lib/framework/rendering/object.dart
+++ b/sky/sdk/lib/framework/rendering/object.dart
@@ -25,15 +25,6 @@ class ParentData {
const kLayoutDirections = 4;
-class RenderObjectDisplayList extends sky.PictureRecorder {
- RenderObjectDisplayList(double width, double height) : super(width, height);
- void paintChild(RenderObject child, Point position) {
- translate(position.x, position.y);
- child.paint(this);
- translate(-position.x, -position.y);
- }
-}
-
abstract class RenderObject extends AbstractNode {
// LAYOUT
@@ -50,6 +41,12 @@ abstract class RenderObject extends AbstractNode {
child.parentData = new ParentData();
}
+ void paintChild(sky.Canvas canvas, RenderObject child, Point position) {
+ canvas.translate(position.x, position.y);
+ child.paint(canvas);
+ canvas.translate(-position.x, -position.y);
+ }
+
Hixie 2015/06/18 00:07:09 I really don't like this change. It is going to en
iansf 2015/06/20 00:02:38 Let me know what you think of the new version.
void adoptChild(RenderObject child) { // only for use by subclasses
// call this whenever you decide a node is a child
assert(!debugDoingLayout);
@@ -201,7 +198,7 @@ abstract class RenderObject extends AbstractNode {
assert(!debugDoingPaint);
scheduler.ensureVisualUpdate();
}
- void paint(RenderObjectDisplayList canvas) { }
+ void paint(sky.Canvas canvas) { }
// EVENTS

Powered by Google App Engine
This is Rietveld 408576698