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; |