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

Unified Diff: cc/layers/picture_layer.cc

Issue 236633008: Switching Chromium to use new Skia SkPictureRecorder API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address code review issue 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: cc/layers/picture_layer.cc
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
index e47f4b88d13e19d2992068bc06939abeab445031..2e1f0e14813aa56fa45276b504d424857b749397 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -186,10 +186,10 @@ skia::RefPtr<SkPicture> PictureLayer::GetPicture() const {
int height = bounds().height();
gfx::RectF opaque;
- skia::RefPtr<SkPicture> picture = skia::AdoptRef(new SkPicture);
- SkCanvas* canvas = picture->beginRecording(width, height);
+ SkPictureRecorder recorder;
+ SkCanvas* canvas = recorder.beginRecording(width, height);
client_->PaintContents(canvas, gfx::Rect(width, height), &opaque);
- picture->endRecording();
+ skia::RefPtr<SkPicture> picture = skia::AdoptRef(recorder.endRecording());
return picture;
}
« no previous file with comments | « cc/layers/content_layer.cc ('k') | cc/resources/picture.cc » ('j') | cc/resources/picture.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698