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

Unified Diff: bench/MergeBench.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 | « bench/ImageBench.cpp ('k') | bench/PDFBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/MergeBench.cpp
diff --git a/bench/MergeBench.cpp b/bench/MergeBench.cpp
index 925b6b2bfe869070070f8f0d488b10b5123cc270..b24f988ded06a96f814bebc151284d976d642165 100644
--- a/bench/MergeBench.cpp
+++ b/bench/MergeBench.cpp
@@ -45,8 +45,8 @@ protected:
private:
SkImageFilter* mergeBitmaps() {
- SkAutoTUnref<SkImageFilter> first(SkImageSource::Create(fCheckerboard));
- SkAutoTUnref<SkImageFilter> second(SkImageSource::Create(fImage));
+ SkAutoTUnref<SkImageFilter> first(SkImageSource::Create(fCheckerboard.get()));
+ SkAutoTUnref<SkImageFilter> second(SkImageSource::Create(fImage.get()));
return SkMergeImageFilter::Create(first, second);
}
@@ -59,7 +59,7 @@ private:
paint.setTextSize(SkIntToScalar(96));
const char* str = "g";
surface->getCanvas()->drawText(str, strlen(str), 15, 55, paint);
- fImage.reset(surface->newImageSnapshot());
+ fImage = surface->makeImageSnapshot();
}
void make_checkerboard() {
@@ -82,12 +82,12 @@ private:
}
}
- fCheckerboard.reset(surface->newImageSnapshot());
+ fCheckerboard = surface->makeImageSnapshot();
}
bool fIsSmall;
bool fInitialized;
- SkAutoTUnref<SkImage> fImage, fCheckerboard;
+ sk_sp<SkImage> fImage, fCheckerboard;
typedef Benchmark INHERITED;
};
« no previous file with comments | « bench/ImageBench.cpp ('k') | bench/PDFBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698