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

Unified Diff: gm/samplerstress.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/roundrects.cpp ('k') | gm/shaderbounds.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/samplerstress.cpp
diff --git a/gm/samplerstress.cpp b/gm/samplerstress.cpp
index f317cf9103d0ac6b9abcb44a59f0e00fd5a50db6..4bec6784a891ed11830270d322dd03201bd1b7cb 100644
--- a/gm/samplerstress.cpp
+++ b/gm/samplerstress.cpp
@@ -21,7 +21,11 @@
public:
SamplerStressGM()
: fTextureCreated(false)
+ , fShader(nullptr)
, fMaskFilter(nullptr) {
+ }
+
+ virtual ~SamplerStressGM() {
}
protected:
@@ -65,14 +69,15 @@
}
void createShader() {
- if (fShader) {
+ if (fShader.get()) {
return;
}
createTexture();
- fShader = SkShader::MakeBitmapShader(fTexture, SkShader::kRepeat_TileMode,
- SkShader::kRepeat_TileMode);
+ fShader.reset(SkShader::CreateBitmapShader(fTexture,
+ SkShader::kRepeat_TileMode,
+ SkShader::kRepeat_TileMode));
}
void createMaskFilter() {
@@ -135,9 +140,9 @@
}
private:
- SkBitmap fTexture;
- bool fTextureCreated;
- sk_sp<SkShader> fShader;
+ SkBitmap fTexture;
+ bool fTextureCreated;
+ SkAutoTUnref<SkShader> fShader;
SkAutoTUnref<SkMaskFilter> fMaskFilter;
typedef GM INHERITED;
« no previous file with comments | « gm/roundrects.cpp ('k') | gm/shaderbounds.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698