Index: gm/modecolorfilters.cpp |
diff --git a/gm/modecolorfilters.cpp b/gm/modecolorfilters.cpp |
index 4e5d45cf96e5045ee6de71db739c2fc32927d4e7..de6a18a41c85e2320773743e82ee0d9fa92728b3 100644 |
--- a/gm/modecolorfilters.cpp |
+++ b/gm/modecolorfilters.cpp |
@@ -121,7 +121,9 @@ |
static const int kRectsPerRow = SkMax32(this->getISize().fWidth / kRectWidth, 1); |
for (size_t cfm = 0; cfm < SK_ARRAY_COUNT(modes); ++cfm) { |
for (size_t cfc = 0; cfc < SK_ARRAY_COUNT(colors); ++cfc) { |
- paint.setColorFilter(SkColorFilter::MakeModeFilter(colors[cfc], modes[cfm])); |
+ SkAutoTUnref<SkColorFilter> cf(SkColorFilter::CreateModeFilter(colors[cfc], |
+ modes[cfm])); |
+ paint.setColorFilter(cf); |
for (size_t s = 0; s < SK_ARRAY_COUNT(shaders); ++s) { |
paint.setShader(shaders[s]); |
bool hasShader = nullptr == paint.getShader(); |