Index: samplecode/SampleLayers.cpp |
diff --git a/samplecode/SampleLayers.cpp b/samplecode/SampleLayers.cpp |
index beb7e4ae1a736b08cc75e70d4582c2cc859396d7..118356872a7d478b6efd1c49d95506580de65e6d 100644 |
--- a/samplecode/SampleLayers.cpp |
+++ b/samplecode/SampleLayers.cpp |
@@ -244,13 +244,13 @@ DEF_SAMPLE( return new LayersView; ) |
class BackdropView : public SampleView { |
SkPoint fCenter; |
SkScalar fAngle; |
- SkAutoTUnref<SkImage> fImage; |
+ sk_sp<SkImage> fImage; |
SkAutoTUnref<SkImageFilter> fFilter; |
public: |
BackdropView() { |
fCenter.set(200, 150); |
fAngle = 0; |
- fImage.reset(GetResourceAsImage("mandrill_512.png")); |
+ fImage = GetResourceAsImage("mandrill_512.png"); |
fFilter.reset(SkDilateImageFilter::Create(8, 8)); |
} |
@@ -265,7 +265,7 @@ protected: |
} |
void onDrawContent(SkCanvas* canvas) override { |
- canvas->drawImage(fImage, 0, 0, nullptr); |
+ canvas->drawImage(fImage.get(), 0, 0, nullptr); |
const SkScalar w = 250; |
const SkScalar h = 150; |