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

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: Rebased version of previous patch 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..6811987d49854f80b7261bcaac7b78d74d28d3d7 100644
--- a/sky/examples/raw/shadow.dart
+++ b/sky/examples/raw/shadow.dart
@@ -6,7 +6,8 @@ import 'dart:sky';
void beginFrame(double timeStamp) {
var size = 100.0;
- PictureRecorder canvas = new PictureRecorder(view.width, view.height);
+ PictureRecorder recorder = new PictureRecorder();
+ Canvas canvas = new Canvas(recorder, view.width, view.height);
canvas.translate(size + 10.0, size + 10.0);
Paint paint = new Paint();
@@ -30,7 +31,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