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

Unified Diff: bench/DisplacementBench.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 | « no previous file | bench/ImageBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/DisplacementBench.cpp
diff --git a/bench/DisplacementBench.cpp b/bench/DisplacementBench.cpp
index f3f9472061fd8eb61ef8626e252d497c75c420ee..c22b8fd2d14b776db1f53b4348618862cadf343e 100644
--- a/bench/DisplacementBench.cpp
+++ b/bench/DisplacementBench.cpp
@@ -67,7 +67,7 @@ protected:
}
}
- fCheckerboard.reset(surface->newImageSnapshot());
+ fCheckerboard = surface->makeImageSnapshot();
}
void drawClippedBitmap(SkCanvas* canvas, int x, int y, const SkPaint& paint) {
@@ -82,7 +82,7 @@ protected:
inline bool isSmall() const { return fIsSmall; }
SkBitmap fBitmap;
- SkAutoTUnref<SkImage> fCheckerboard;
+ sk_sp<SkImage> fCheckerboard;
private:
bool fInitialized;
@@ -102,7 +102,7 @@ protected:
void onDraw(int loops, SkCanvas* canvas) override {
SkPaint paint;
- SkAutoTUnref<SkImageFilter> displ(SkImageSource::Create(fCheckerboard));
+ SkAutoTUnref<SkImageFilter> displ(SkImageSource::Create(fCheckerboard.get()));
// No displacement effect
paint.setImageFilter(SkDisplacementMapEffect::Create(
SkDisplacementMapEffect::kR_ChannelSelectorType,
@@ -129,7 +129,7 @@ protected:
void onDraw(int loops, SkCanvas* canvas) override {
SkPaint paint;
- SkAutoTUnref<SkImageFilter> displ(SkImageSource::Create(fCheckerboard));
+ SkAutoTUnref<SkImageFilter> displ(SkImageSource::Create(fCheckerboard.get()));
// Displacement, with 1 alpha component (which isn't pre-multiplied)
paint.setImageFilter(SkDisplacementMapEffect::Create(
SkDisplacementMapEffect::kB_ChannelSelectorType,
@@ -155,7 +155,7 @@ protected:
void onDraw(int loops, SkCanvas* canvas) override {
SkPaint paint;
- SkAutoTUnref<SkImageFilter> displ(SkImageSource::Create(fCheckerboard));
+ SkAutoTUnref<SkImageFilter> displ(SkImageSource::Create(fCheckerboard.get()));
// Displacement, with 2 non-alpha components
paint.setImageFilter(SkDisplacementMapEffect::Create(
SkDisplacementMapEffect::kR_ChannelSelectorType,
« no previous file with comments | « no previous file | bench/ImageBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698