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

Unified Diff: gm/localmatriximagefilter.cpp

Issue 1837293003: Revert of Switch SkLocalMatrixImageFilter and SkPaintImageFilter over 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/imagefiltersscaled.cpp ('k') | include/core/SkImageFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/localmatriximagefilter.cpp
diff --git a/gm/localmatriximagefilter.cpp b/gm/localmatriximagefilter.cpp
index 5414fe341cc0a3a89f08d53a8a74e3370630ed62..d53380b85856957c2ac90232c6a6e19b186f76bf 100644
--- a/gm/localmatriximagefilter.cpp
+++ b/gm/localmatriximagefilter.cpp
@@ -49,7 +49,7 @@
return SkISize::Make(640, 640);
}
- static void show_image(SkCanvas* canvas, SkImage* image, sk_sp<SkImageFilter> filter) {
+ static void show_image(SkCanvas* canvas, SkImage* image, SkImageFilter* filter) {
SkPaint paint;
paint.setStyle(SkPaint::kStroke_Style);
SkRect r = SkRect::MakeIWH(image->width(), image->height()).makeOutset(SK_ScalarHalf,
@@ -81,14 +81,14 @@
canvas->translate(40, 40);
for (auto&& factory : factories) {
- sk_sp<SkImageFilter> filter(factory());
+ SkAutoTUnref<SkImageFilter> filter(factory());
canvas->save();
show_image(canvas, image0.get(), filter);
for (const auto& matrix : matrices) {
- sk_sp<SkImageFilter> localFilter(filter->makeWithLocalMatrix(matrix));
+ SkAutoTUnref<SkImageFilter> localFilter(filter->newWithLocalMatrix(matrix));
canvas->translate(spacer, 0);
- show_image(canvas, image0.get(), std::move(localFilter));
+ show_image(canvas, image0.get(), localFilter);
}
canvas->restore();
canvas->translate(0, spacer);
« no previous file with comments | « gm/imagefiltersscaled.cpp ('k') | include/core/SkImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698