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

Unified Diff: gm/recordopts.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/imagefiltersgraph.cpp ('k') | gm/tablecolorfilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/recordopts.cpp
diff --git a/gm/recordopts.cpp b/gm/recordopts.cpp
index d920a1785b7399786faacda99d27265464631cba..25a88f73e54defdb3b57ff46ae03f5b414652ded 100644
--- a/gm/recordopts.cpp
+++ b/gm/recordopts.cpp
@@ -39,10 +39,11 @@ static void install_detector_color_filter(SkPaint* drawPaint) {
// This detector detects that image filter phase of the pixel pipeline receives the correct value.
static void install_detector_image_filter(SkPaint* drawPaint) {
- auto colorFilter(make_detector_color_filter());
- SkImageFilter* imageFilter =
- SkColorFilterImageFilter::Create(colorFilter.get(), drawPaint->getImageFilter());
- drawPaint->setImageFilter(imageFilter)->unref();
+ sk_sp<SkColorFilter> colorFilter(make_detector_color_filter());
+ sk_sp<SkImageFilter> imageFilter(
+ SkColorFilterImageFilter::Make(std::move(colorFilter),
+ sk_ref_sp(drawPaint->getImageFilter())));
+ drawPaint->setImageFilter(std::move(imageFilter));
}
static void no_detector_install(SkPaint*) {
« no previous file with comments | « gm/imagefiltersgraph.cpp ('k') | gm/tablecolorfilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698