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

Unified Diff: gm/fadefilter.cpp

Issue 1858813002: Update SkColorFilterImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 4 years, 8 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/dropshadowimagefilter.cpp ('k') | gm/imagefilters.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/fadefilter.cpp
diff --git a/gm/fadefilter.cpp b/gm/fadefilter.cpp
index 386e32b098c6a351430917d0fef4942e68394b95..c9c362b050ec947b3bb1293453103370a2feec6b 100644
--- a/gm/fadefilter.cpp
+++ b/gm/fadefilter.cpp
@@ -15,9 +15,8 @@ DEF_SIMPLE_GM(fadefilter, canvas, 256, 256) {
0, 1, 0, 0, 128.0f,
0, 0, 1, 0, 128.0f,
0, 0, 0, 1, 0 };
- auto colorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(matrix));
- SkAutoTUnref<SkImageFilter> filter(SkColorFilterImageFilter::Create(colorFilter.get()));
+ sk_sp<SkColorFilter> colorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(matrix));
SkPaint layerPaint;
- layerPaint.setImageFilter(filter);
+ layerPaint.setImageFilter(SkColorFilterImageFilter::Make(std::move(colorFilter), nullptr));
canvas->drawRect(SkRect::MakeLTRB(64, 64, 192, 192), layerPaint);
}
« no previous file with comments | « gm/dropshadowimagefilter.cpp ('k') | gm/imagefilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698