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

Unified Diff: gm/pictureshader.cpp

Issue 214953003: split SkPictureRecorder out of SkPicture (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: update to ToT (again) Created 6 years, 8 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: gm/pictureshader.cpp
===================================================================
--- gm/pictureshader.cpp (revision 14159)
+++ gm/pictureshader.cpp (working copy)
@@ -31,11 +31,11 @@
, fSceneSize(sceneSize) {
// Build the picture.
- SkAutoTUnref<SkPicture> p(SkNEW(SkPicture));
- SkCanvas* pictureCanvas = p->beginRecording(SkScalarRoundToInt(tileSize),
- SkScalarRoundToInt(tileSize));
+ SkPictureRecorder recorder;
+ SkCanvas* pictureCanvas = recorder.beginRecording(SkScalarRoundToInt(tileSize),
+ SkScalarRoundToInt(tileSize));
this->drawTile(pictureCanvas);
- p->endRecording();
+ SkAutoTUnref<SkPicture> p(recorder.endRecording());
// Build a reference bitmap.
SkBitmap bm;

Powered by Google App Engine
This is Rietveld 408576698