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

Unified Diff: gm/imagefilterscropexpand.cpp

Issue 1825073002: Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove flag 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/imagefiltersbase.cpp ('k') | gm/imagefilterscropped.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagefilterscropexpand.cpp
diff --git a/gm/imagefilterscropexpand.cpp b/gm/imagefilterscropexpand.cpp
index f3ca4d32a6b872aeb24b6c6085322f9082860c72..ada206cea4b3ec7c84564c45d7012479bc4cd0f3 100644
--- a/gm/imagefilterscropexpand.cpp
+++ b/gm/imagefilterscropexpand.cpp
@@ -40,8 +40,6 @@ protected:
SkISize onISize() override { return SkISize::Make(730, 650); }
void onDraw(SkCanvas* canvas) override {
- SkAutoTUnref<SkColorFilter> cf(
- SkColorFilter::CreateModeFilter(SK_ColorBLUE, SkXfermode::kSrcIn_Mode));
SkImageFilter::CropRect cropRect(
SkRect::Make(SkIRect::MakeXYWH(10, 10, 44, 44)),
SkImageFilter::CropRect::kHasAll_CropEdge);
@@ -59,7 +57,7 @@ protected:
0, 1, 0, 0, sk255,
0, 0, 1, 0, 0,
0, 0, 0, 0, sk255 };
- SkAutoTUnref<SkColorFilter> cfAlphaTrans(SkColorMatrixFilter::Create(matrix));
+ auto cfAlphaTrans(SkColorFilter::MakeMatrixFilterRowMajor255(matrix));
SkRect r = SkRect::MakeWH(SkIntToScalar(64), SkIntToScalar(64));
SkScalar MARGIN = SkIntToScalar(12);
@@ -80,7 +78,7 @@ protected:
SkImageFilter::CropRect bigRect(rect, SkImageFilter::CropRect::kHasAll_CropEdge);
Draw(canvas, checkerboard, rect, SkColorFilterImageFilter::Create(
- cfAlphaTrans, noopCropped.get(), &bigRect));
+ cfAlphaTrans.get(), noopCropped.get(), &bigRect));
Draw(canvas, checkerboard, rect, SkBlurImageFilter::Create(
0.3f, 0.3f, noopCropped.get(), &bigRect));
« no previous file with comments | « gm/imagefiltersbase.cpp ('k') | gm/imagefilterscropped.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698