Index: gm/imagesource2.cpp |
diff --git a/gm/imagesource2.cpp b/gm/imagesource2.cpp |
index 3a3d27360d8097728a46b2f46437ba4cb7ce24e5..ba6af46cfbd547bc4405ff259726ef35a1f33ff1 100644 |
--- a/gm/imagesource2.cpp |
+++ b/gm/imagesource2.cpp |
@@ -60,15 +60,13 @@ protected: |
} |
void onDraw(SkCanvas* canvas) override { |
- SkRect srcRect = SkRect::MakeLTRB(0, 0, |
- SkIntToScalar(kImageSize), SkIntToScalar(kImageSize)); |
- SkRect dstRect = SkRect::MakeLTRB(0.75f, 0.75f, 225.75f, 225.75f); |
- |
- SkAutoTUnref<SkImageFilter> filter( |
- SkImageSource::Create(fImage.get(), srcRect, dstRect, fFilter)); |
+ const SkRect srcRect = SkRect::MakeLTRB(0, 0, |
+ SkIntToScalar(kImageSize), |
+ SkIntToScalar(kImageSize)); |
+ const SkRect dstRect = SkRect::MakeLTRB(0.75f, 0.75f, 225.75f, 225.75f); |
SkPaint p; |
- p.setImageFilter(filter); |
+ p.setImageFilter(SkImageSource::Make(fImage, srcRect, dstRect, fFilter)); |
canvas->saveLayer(nullptr, &p); |
canvas->restore(); |