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

Unified Diff: gm/lumafilter.cpp

Issue 1820303002: Revert of switch colorfilters to sk_sp (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 | « gm/imagefiltersgraph.cpp ('k') | gm/megalooper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/lumafilter.cpp
diff --git a/gm/lumafilter.cpp b/gm/lumafilter.cpp
index 10eefabd5642ddc7c382a7bfbfe48e8138120be5..adffd008c10bbe571d495d007e3ce827d8c95b61 100644
--- a/gm/lumafilter.cpp
+++ b/gm/lumafilter.cpp
@@ -26,7 +26,7 @@
paint);
}
-static void draw_scene(SkCanvas* canvas, const sk_sp<SkColorFilter>& filter, SkXfermode::Mode mode,
+static void draw_scene(SkCanvas* canvas, SkColorFilter* filter, SkXfermode::Mode mode,
const sk_sp<SkShader>& s1, const sk_sp<SkShader>& s2) {
SkPaint paint;
paint.setAntiAlias(true);
@@ -83,7 +83,7 @@
SkPoint g2Points[] = { { 0, 0 }, { kSize, 0 } };
SkScalar pos[] = { 0.2f, 1.0f };
- fFilter = SkLumaColorFilter::Make();
+ fFilter.reset(SkLumaColorFilter::Create());
fGr1 = SkGradientShader::MakeLinear(g1Points, g1Colors, pos, SK_ARRAY_COUNT(g1Colors),
SkShader::kClamp_TileMode);
fGr2 = SkGradientShader::MakeLinear(g2Points, g2Colors, pos, SK_ARRAY_COUNT(g2Colors),
@@ -137,8 +137,8 @@
}
private:
- sk_sp<SkColorFilter> fFilter;
- sk_sp<SkShader> fGr1, fGr2;
+ SkAutoTUnref<SkColorFilter> fFilter;
+ sk_sp<SkShader> fGr1, fGr2;
typedef skiagm::GM INHERITED;
};
« no previous file with comments | « gm/imagefiltersgraph.cpp ('k') | gm/megalooper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698