Index: samplecode/SampleColorFilter.cpp |
diff --git a/samplecode/SampleColorFilter.cpp b/samplecode/SampleColorFilter.cpp |
index 0b8acc32d71b7dc2680dd39a737fdf29d409b8e6..4ee8949410e58f72b3b41ee3b962081774eca6f0 100644 |
--- a/samplecode/SampleColorFilter.cpp |
+++ b/samplecode/SampleColorFilter.cpp |
@@ -184,7 +184,8 @@ |
for (size_t y = 0; y < SK_ARRAY_COUNT(gColors); y++) { |
for (size_t x = 0; x < SK_ARRAY_COUNT(gModes); x++) { |
- paint.setColorFilter(SkColorFilter::MakeModeFilter(gColors[y], gModes[x])); |
+ SkColorFilter* cf = SkColorFilter::CreateModeFilter(gColors[y], gModes[x]); |
+ SkSafeUnref(paint.setColorFilter(cf)); |
canvas->drawBitmap(fBitmap, x * N * 1.25f, y * N * scale, &paint); |
} |
} |