Chromium Code Reviews| Index: sky/examples/raw/shadow.dart |
| diff --git a/sky/examples/raw/shadow.dart b/sky/examples/raw/shadow.dart |
| index 124df9821d24f4a9370bc905054f38710b094f03..b9ef9d5369367d2360fdbacddfa911047a97f5c0 100644 |
| --- a/sky/examples/raw/shadow.dart |
| +++ b/sky/examples/raw/shadow.dart |
| @@ -4,9 +4,12 @@ |
| import 'dart:sky'; |
| +import 'package:sky/rendering/object.dart'; |
|
abarth-chromium
2015/06/23 02:28:45
ditto
iansf
2015/06/23 22:46:09
Done.
|
| + |
| void beginFrame(double timeStamp) { |
| var size = 100.0; |
| - PictureRecorder canvas = new PictureRecorder(view.width, view.height); |
| + PictureRecorder recorder = new PictureRecorder(); |
| + RenderCanvas canvas = new RenderCanvas(recorder, view.width, view.height); |
| canvas.translate(size + 10.0, size + 10.0); |
| Paint paint = new Paint(); |
| @@ -30,7 +33,7 @@ void beginFrame(double timeStamp) { |
| canvas.drawPaint( |
| new Paint()..color = const Color.fromARGB(255, 255, 255, 255)); |
| canvas.drawRect(new Rect.fromLTRB(-size, -size, size, size), paint); |
| - view.picture = canvas.endRecording(); |
| + view.picture = recorder.endRecording(); |
| } |
| void main() { |