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

Unified Diff: gm/imagefilterscropexpand.cpp

Issue 1820303002: Revert of switch colorfilters 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/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 ada206cea4b3ec7c84564c45d7012479bc4cd0f3..f3ca4d32a6b872aeb24b6c6085322f9082860c72 100644
--- a/gm/imagefilterscropexpand.cpp
+++ b/gm/imagefilterscropexpand.cpp
@@ -40,6 +40,8 @@
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);
@@ -57,7 +59,7 @@
0, 1, 0, 0, sk255,
0, 0, 1, 0, 0,
0, 0, 0, 0, sk255 };
- auto cfAlphaTrans(SkColorFilter::MakeMatrixFilterRowMajor255(matrix));
+ SkAutoTUnref<SkColorFilter> cfAlphaTrans(SkColorMatrixFilter::Create(matrix));
SkRect r = SkRect::MakeWH(SkIntToScalar(64), SkIntToScalar(64));
SkScalar MARGIN = SkIntToScalar(12);
@@ -78,7 +80,7 @@
SkImageFilter::CropRect bigRect(rect, SkImageFilter::CropRect::kHasAll_CropEdge);
Draw(canvas, checkerboard, rect, SkColorFilterImageFilter::Create(
- cfAlphaTrans.get(), noopCropped.get(), &bigRect));
+ cfAlphaTrans, 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