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

Unified Diff: bench/RectoriBench.cpp

Issue 1821533002: guard rasterizer and drawlooper setters (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: guard google3 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/BlurRoundRectBench.cpp ('k') | gm/blurroundrect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/RectoriBench.cpp
diff --git a/bench/RectoriBench.cpp b/bench/RectoriBench.cpp
index 1f4da868b0cc10c2dae4c959c44d18c48e72d157..e2a44e383f6aa69e5b3b5a654e6fdd9d5d19e4fa 100644
--- a/bench/RectoriBench.cpp
+++ b/bench/RectoriBench.cpp
@@ -52,7 +52,7 @@ protected:
SkScalar translate = 2.0f * size;
SkPaint paint;
- paint.setLooper(this->createLooper(-translate, blurSigma))->unref();
+ paint.setLooper(this->createLooper(-translate, blurSigma));
paint.setColor(0xff000000 | Random.nextU());
paint.setAntiAlias(true);
@@ -71,7 +71,7 @@ private:
H = 480,
};
- SkLayerDrawLooper* createLooper(SkScalar xOff, SkScalar sigma) {
+ sk_sp<SkDrawLooper> createLooper(SkScalar xOff, SkScalar sigma) {
SkLayerDrawLooper::Builder looperBuilder;
//-----------------------------------------------
@@ -96,7 +96,7 @@ private:
info.fOffset.set(0, 0);
paint = looperBuilder.addLayer(info);
- return looperBuilder.detachLooper();
+ return looperBuilder.detach();
}
typedef Benchmark INHERITED;
« no previous file with comments | « bench/BlurRoundRectBench.cpp ('k') | gm/blurroundrect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698