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

Unified Diff: sky/examples/raw/shadow.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: j/k -- this one should actually be fully merged and testable 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/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() {

Powered by Google App Engine
This is Rietveld 408576698