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

Unified Diff: gm/tablecolorfilter.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/recordopts.cpp ('k') | gm/testimagefilters.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/tablecolorfilter.cpp
diff --git a/gm/tablecolorfilter.cpp b/gm/tablecolorfilter.cpp
index a644bd105377a7f88409a65ef8f88f5641ecf8d8..26a3c2c4f19f2ac8e34aae69f8e2c7343d8f3521 100644
--- a/gm/tablecolorfilter.cpp
+++ b/gm/tablecolorfilter.cpp
@@ -163,19 +163,19 @@ protected:
paint.setColorFilter(nullptr);
for (unsigned i = 0; i < SK_ARRAY_COUNT(gColorFilterMakers); ++i) {
- auto colorFilter1(gColorFilterMakers[i]());
- SkAutoTUnref<SkImageFilter> imageFilter1(SkColorFilterImageFilter::Create(
- colorFilter1.get(), nullptr, nullptr));
+ sk_sp<SkColorFilter> colorFilter1(gColorFilterMakers[i]());
+ sk_sp<SkImageFilter> imageFilter1(SkColorFilterImageFilter::Make(
+ std::move(colorFilter1), nullptr));
// Move down to the next line and draw it
// each draw being at xOffset of the previous one
y += yOffset;
x = 0;
for (unsigned j = 1; j < SK_ARRAY_COUNT(gColorFilterMakers); ++j) {
- auto colorFilter2(gColorFilterMakers[j]());
- SkAutoTUnref<SkImageFilter> imageFilter2(SkColorFilterImageFilter::Create(
- colorFilter2.get(), imageFilter1, nullptr));
- paint.setImageFilter(imageFilter2);
+ sk_sp<SkColorFilter> colorFilter2(gColorFilterMakers[j]());
+ sk_sp<SkImageFilter> imageFilter2(SkColorFilterImageFilter::Make(
+ std::move(colorFilter2), imageFilter1, nullptr));
+ paint.setImageFilter(std::move(imageFilter2));
canvas->drawBitmap(bm, x, y, &paint);
x += xOffset;
}
« no previous file with comments | « gm/recordopts.cpp ('k') | gm/testimagefilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698