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

Unified Diff: gm/hairmodes.cpp

Issue 1790353002: Revert of more shader-->sp conversions (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 | « gm/gradtext.cpp ('k') | gm/imagefiltersclipped.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/hairmodes.cpp
diff --git a/gm/hairmodes.cpp b/gm/hairmodes.cpp
index 15e75fe847fa5a74c278857ec732ca6d1f6dfc3a..4f85c198836d5d3c607c63799b109d30c27e5df6 100644
--- a/gm/hairmodes.cpp
+++ b/gm/hairmodes.cpp
@@ -58,7 +58,7 @@
return H;
}
-static sk_sp<SkShader> make_bg_shader() {
+static SkShader* make_bg_shader() {
SkBitmap bm;
bm.allocN32Pixels(2, 2);
*bm.getAddr32(0, 0) = *bm.getAddr32(1, 1) = 0xFFFFFFFF;
@@ -66,8 +66,10 @@
SkMatrix m;
m.setScale(SkIntToScalar(6), SkIntToScalar(6));
- return SkShader::MakeBitmapShader(bm,
- SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, &m);
+ return SkShader::CreateBitmapShader(bm,
+ SkShader::kRepeat_TileMode,
+ SkShader::kRepeat_TileMode,
+ &m);
}
namespace skiagm {
@@ -83,7 +85,7 @@
virtual SkISize onISize() override { return SkISize::Make(640, 480); }
void onOnceBeforeDraw() override {
- fBGPaint.setShader(make_bg_shader());
+ fBGPaint.setShader(make_bg_shader())->unref();
}
void onDraw(SkCanvas* canvas) override {
« no previous file with comments | « gm/gradtext.cpp ('k') | gm/imagefiltersclipped.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698