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

Unified Diff: bench/ImageBench.cpp

Issue 1817383002: switch surface to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/DisplacementBench.cpp ('k') | bench/MergeBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/ImageBench.cpp
diff --git a/bench/ImageBench.cpp b/bench/ImageBench.cpp
index b07d267b6038b449d5b85584fa519e9be3d6b82b..fbfce05a664018582e7e3136fa495a3bdf8e75f4 100644
--- a/bench/ImageBench.cpp
+++ b/bench/ImageBench.cpp
@@ -31,12 +31,12 @@ protected:
void onPerCanvasPreDraw(SkCanvas* canvas) override {
// create an Image reflecting the canvas (gpu or cpu)
SkImageInfo info = SkImageInfo::MakeN32Premul(100, 100);
- SkAutoTUnref<SkSurface> surface(canvas->newSurface(info));
+ auto surface(canvas->makeSurface(info));
canvas->drawColor(SK_ColorRED);
fImage = surface->makeImageSnapshot();
// create a cpu-backed Surface
- fRasterSurface.reset(SkSurface::NewRaster(info));
+ fRasterSurface = SkSurface::MakeRaster(info);
}
void onPerCanvasPostDraw(SkCanvas*) override {
@@ -57,7 +57,7 @@ protected:
private:
SkString fName;
sk_sp<SkImage> fImage;
- SkAutoTUnref<SkSurface> fRasterSurface;
+ sk_sp<SkSurface> fRasterSurface;
typedef Benchmark INHERITED;
};
« no previous file with comments | « bench/DisplacementBench.cpp ('k') | bench/MergeBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698