aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleColorFilter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'samplecode/SampleColorFilter.cpp')
-rw-r--r--samplecode/SampleColorFilter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/samplecode/SampleColorFilter.cpp b/samplecode/SampleColorFilter.cpp
index 0b8acc32d7..4ee8949410 100644
--- a/samplecode/SampleColorFilter.cpp
+++ b/samplecode/SampleColorFilter.cpp
@@ -184,7 +184,8 @@ protected:
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);
}
}