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

Unified Diff: gm/resizeimagefilter.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/repeated_bitmap.cpp ('k') | gm/surface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/resizeimagefilter.cpp
diff --git a/gm/resizeimagefilter.cpp b/gm/resizeimagefilter.cpp
index 9a684a28597252c8722652ac63c638a99ae65a98..2236b76b3e4a38aa393b3416c010d77ab16ed410 100644
--- a/gm/resizeimagefilter.cpp
+++ b/gm/resizeimagefilter.cpp
@@ -97,11 +97,11 @@ protected:
ovalRect.inset(SkIntToScalar(2)/3, SkIntToScalar(2)/3);
surfaceCanvas->drawOval(ovalRect, paint);
}
- SkAutoTUnref<SkImage> image(surface->newImageSnapshot());
+ sk_sp<SkImage> image(surface->makeImageSnapshot());
SkRect inRect = SkRect::MakeXYWH(-4, -4, 20, 20);
SkRect outRect = SkRect::MakeXYWH(-24, -24, 120, 120);
SkAutoTUnref<SkImageFilter> source(
- SkImageSource::Create(image, inRect, outRect, kHigh_SkFilterQuality));
+ SkImageSource::Create(image.get(), inRect, outRect, kHigh_SkFilterQuality));
canvas->translate(srcRect.width() + SkIntToScalar(10), 0);
draw(canvas,
srcRect,
« no previous file with comments | « gm/repeated_bitmap.cpp ('k') | gm/surface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698