Index: sky/tests/resources/display_list.dart |
diff --git a/sky/tests/resources/display_list.dart b/sky/tests/resources/display_list.dart |
index a83f34d0aa9878ed6cdda5111169934f4510891c..48865899651889bb2b8be2d55f4c39a52efb5fdb 100644 |
--- a/sky/tests/resources/display_list.dart |
+++ b/sky/tests/resources/display_list.dart |
@@ -2,6 +2,7 @@ |
import 'dart:async'; |
import 'dart:sky' as sky; |
import "dart:sky.internals" as internals; |
+import 'dart:typed_data'; |
import 'package:sky/widgets/basic.dart'; |
import 'package:sky/rendering/box.dart'; |
@@ -9,15 +10,17 @@ import 'package:sky/rendering/object.dart'; |
typedef void Logger (String s); |
-class TestDisplayList extends RenderObjectDisplayList { |
- TestDisplayList(double width, double height, this.logger, { this.indent: '' }) : |
- this.width = width, |
- this.height = height, |
- super(width, height) { |
- log("TestDisplayList() constructor: $width x $height"); |
+class TestRenderCanvas extends RenderCanvas { |
+ TestRenderCanvas(sky.PictureRecorder recorder, double width, double height, this.logger, { this.indent: '' }) |
+ : recorder = recorder, |
+ width = width, |
+ height = height, |
+ super(recorder, width, height) { |
+ log("TestRenderCanvas() constructor: $width x $height"); |
} |
final String indent; |
+ final sky.PictureRecorder recorder; |
Hixie
2015/06/23 16:36:48
what's this used for?
iansf
2015/06/23 22:46:09
Acknowledged.
|
final double width; |
final double height; |
@@ -54,8 +57,8 @@ class TestDisplayList extends RenderObjectDisplayList { |
log("skew($sx, $sy)"); |
} |
- void concat(List<double> matrix9) { |
- log("concat($matrix9)"); |
+ void concat(Float32List matrix4) { |
+ log("concat($matrix4)"); |
} |
void clipRect(Rect rect) { |
@@ -108,7 +111,7 @@ class TestDisplayList extends RenderObjectDisplayList { |
void paintChild(RenderObject child, Point position) { |
log("paintChild ${child.runtimeType} at $position"); |
- child.paint(new TestDisplayList(width, height, logger, indent: "$indent |")); |
+ child.paint(new TestRenderCanvas(recorder, width, height, logger, indent: "$indent |")); |
} |
} |
@@ -134,8 +137,10 @@ class TestRenderView extends RenderView { |
frame += 1; |
lastPaint = ''; |
log("PAINT FOR FRAME #${frame} ----------------------------------------------"); |
- var canvas = new TestDisplayList(rootConstraints.width, rootConstraints.height, log, indent: "${frame} |"); |
+ var recorder = new sky.PictureRecorder(); |
Hixie
2015/06/23 16:36:49
why is the recorder needed here?
iansf
2015/06/23 22:46:09
As discussed, changing this to create a new |sky.P
|
+ var canvas = new TestRenderCanvas(recorder, rootConstraints.width, rootConstraints.height, log, indent: "${frame} |"); |
paint(canvas); |
+ recorder.endRecording(); |
log("------------------------------------------------------------------------"); |
RenderObject.debugDoingPaint = false; |
} |