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

Unified Diff: gm/verylargebitmap.cpp

Issue 1329143006: fix leaked picture (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/verylargebitmap.cpp
diff --git a/gm/verylargebitmap.cpp b/gm/verylargebitmap.cpp
index 112092c9fd0b2456deeb99b737dd2fc699c1c66e..5c67e77e3e99eef57c35ccf386266125e822ef2d 100644
--- a/gm/verylargebitmap.cpp
+++ b/gm/verylargebitmap.cpp
@@ -32,7 +32,8 @@ static SkImage* make_raster_image(int width, int height, SkColor colors[2]) {
static SkImage* make_picture_image(int width, int height, SkColor colors[2]) {
SkPictureRecorder recorder;
draw(recorder.beginRecording(SkRect::MakeIWH(width, height)), width, height, colors);
- return SkImage::NewFromPicture(recorder.endRecording(), SkISize::Make(width, height),
+ SkAutoTUnref<SkPicture> picture(recorder.endRecording());
+ return SkImage::NewFromPicture(picture, SkISize::Make(width, height),
nullptr, nullptr);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698