Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(855)

Unified Diff: samplecode/SampleColorFilter.cpp

Issue 1821103004: Revert of Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samplecode/SampleAll.cpp ('k') | samplecode/SampleFilterFuzz.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
« no previous file with comments | « samplecode/SampleAll.cpp ('k') | samplecode/SampleFilterFuzz.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698