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

Unified Diff: gm/imagesource2.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/imagesource.cpp ('k') | gm/imagetoyuvplanes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagesource2.cpp
diff --git a/gm/imagesource2.cpp b/gm/imagesource2.cpp
index 7f9c2b5d433f7ef8bf5a46f56f4e600af6c91e5a..46c42f1d1835798b5c193613e554d44600430511 100644
--- a/gm/imagesource2.cpp
+++ b/gm/imagesource2.cpp
@@ -56,7 +56,7 @@ protected:
curColor = (curColor+1) % SK_ARRAY_COUNT(gColors);
}
- fImage.reset(surface->newImageSnapshot());
+ fImage = surface->makeImageSnapshot();
}
void onDraw(SkCanvas* canvas) override {
@@ -65,7 +65,7 @@ protected:
SkRect dstRect = SkRect::MakeLTRB(0.75f, 0.75f, 225.75f, 225.75f);
SkAutoTUnref<SkImageFilter> filter(
- SkImageSource::Create(fImage, srcRect, dstRect, fFilter));
+ SkImageSource::Create(fImage.get(), srcRect, dstRect, fFilter));
SkPaint p;
p.setImageFilter(filter);
@@ -79,7 +79,7 @@ private:
SkString fSuffix;
SkFilterQuality fFilter;
- SkAutoTUnref<SkImage> fImage;
+ sk_sp<SkImage> fImage;
typedef GM INHERITED;
};
« no previous file with comments | « gm/imagesource.cpp ('k') | gm/imagetoyuvplanes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698