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

Unified Diff: gm/xfermodes2.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/xfermodes.cpp ('k') | gm/xfermodes3.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/xfermodes2.cpp
diff --git a/gm/xfermodes2.cpp b/gm/xfermodes2.cpp
index 397f4e1e2963a3f1cc3464af8911fff992bfea6a..db48c03d20788118dc47aa5634c9d0dff3162854 100644
--- a/gm/xfermodes2.cpp
+++ b/gm/xfermodes2.cpp
@@ -99,8 +99,10 @@
SkMatrix lm;
lm.setScale(SkIntToScalar(16), SkIntToScalar(16));
- fBG = SkShader::MakeBitmapShader(bg, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode,
- &lm);
+ fBG.reset(SkShader::CreateBitmapShader(bg,
+ SkShader::kRepeat_TileMode,
+ SkShader::kRepeat_TileMode,
+ &lm));
SkBitmap srcBmp;
srcBmp.allocN32Pixels(kSize, kSize);
@@ -113,8 +115,9 @@
pixels[kSize * y + x] = rowColor;
}
}
- fSrc = SkShader::MakeBitmapShader(srcBmp, SkShader::kClamp_TileMode,
- SkShader::kClamp_TileMode);
+ fSrc.reset(SkShader::CreateBitmapShader(srcBmp,
+ SkShader::kClamp_TileMode,
+ SkShader::kClamp_TileMode));
SkBitmap dstBmp;
dstBmp.allocN32Pixels(kSize, kSize);
pixels = reinterpret_cast<SkPMColor*>(dstBmp.getPixels());
@@ -126,8 +129,9 @@
pixels[kSize * y + x] = colColor;
}
}
- fDst = SkShader::MakeBitmapShader(dstBmp, SkShader::kClamp_TileMode,
- SkShader::kClamp_TileMode);
+ fDst.reset(SkShader::CreateBitmapShader(dstBmp,
+ SkShader::kClamp_TileMode,
+ SkShader::kClamp_TileMode));
}
enum {
@@ -135,9 +139,9 @@
kSize = 256 >> kShift,
};
- sk_sp<SkShader> fBG;
- sk_sp<SkShader> fSrc;
- sk_sp<SkShader> fDst;
+ SkAutoTUnref<SkShader> fBG;
+ SkAutoTUnref<SkShader> fSrc;
+ SkAutoTUnref<SkShader> fDst;
typedef GM INHERITED;
};
« no previous file with comments | « gm/xfermodes.cpp ('k') | gm/xfermodes3.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698