Index: gm/imagefiltersbase.cpp |
diff --git a/gm/imagefiltersbase.cpp b/gm/imagefiltersbase.cpp |
index ca8a2d421a758342248e5d489875c6868fb64f51..a55328a999fd2489e9c463f0e03a2531ff8a6380 100644 |
--- a/gm/imagefiltersbase.cpp |
+++ b/gm/imagefiltersbase.cpp |
@@ -192,16 +192,18 @@ |
draw_bitmap, |
}; |
- auto cf = SkColorFilter::MakeModeFilter(SK_ColorRED, SkXfermode::kSrcIn_Mode); |
+ SkColorFilter* cf = SkColorFilter::CreateModeFilter(SK_ColorRED, |
+ SkXfermode::kSrcIn_Mode); |
SkImageFilter* filters[] = { |
nullptr, |
IdentityImageFilter::Create(), |
FailImageFilter::Create(), |
- SkColorFilterImageFilter::Create(cf.get()), |
+ SkColorFilterImageFilter::Create(cf), |
SkBlurImageFilter::Create(12.0f, 0.0f), |
SkDropShadowImageFilter::Create(10.0f, 5.0f, 3.0f, 3.0f, SK_ColorBLUE, |
SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode), |
}; |
+ cf->unref(); |
SkRect r = SkRect::MakeWH(SkIntToScalar(64), SkIntToScalar(64)); |
SkScalar MARGIN = SkIntToScalar(16); |
@@ -318,7 +320,7 @@ |
ImageFiltersText_CF() : ImageFiltersTextBaseGM("color") {} |
void installFilter(SkPaint* paint) override { |
- paint->setColorFilter(SkColorFilter::MakeModeFilter(SK_ColorBLUE, SkXfermode::kSrcIn_Mode)); |
+ paint->setColorFilter(SkColorFilter::CreateModeFilter(SK_ColorBLUE, SkXfermode::kSrcIn_Mode))->unref(); |
} |
}; |
DEF_GM( return new ImageFiltersText_CF; ) |