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

Unified Diff: gm/imagealphathreshold.cpp

Issue 1810813003: update callsites for Make image factories (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: start to take advantage of sk_sp drawImage Created 4 years, 9 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 | « gm/image_shader.cpp ('k') | gm/imagefilters.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagealphathreshold.cpp
diff --git a/gm/imagealphathreshold.cpp b/gm/imagealphathreshold.cpp
index ea7185be1dbb8747d8cadcd9109f8ef3a602ed38..eafc32f8d62706aea64d7b26b4ce9b1960c52a75 100644
--- a/gm/imagealphathreshold.cpp
+++ b/gm/imagealphathreshold.cpp
@@ -102,10 +102,9 @@ protected:
surface->getCanvas()->clear(SK_ColorWHITE);
draw_rects(surface->getCanvas());
- SkAutoTUnref<SkImage> image(surface->newImageSnapshot());
SkPaint paint = create_filter_paint();
canvas->clipRect(SkRect::MakeLTRB(100, 100, WIDTH - 100, HEIGHT - 100));
- canvas->drawImage(image, 0, 0, &paint);
+ canvas->drawImage(surface->makeImageSnapshot().get(), 0, 0, &paint);
}
private:
« no previous file with comments | « gm/image_shader.cpp ('k') | gm/imagefilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698