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

Unified Diff: tests/ColorMatrixTest.cpp

Issue 1821103004: Revert of 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: 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 | « tests/ColorFilterTest.cpp ('k') | tests/GpuColorFilterTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ColorMatrixTest.cpp
diff --git a/tests/ColorMatrixTest.cpp b/tests/ColorMatrixTest.cpp
index 7919b40242a1dd262e190c7999dcc92fc45f6eeb..1eea4f5a9de4c252a55a59f88f8bb3a773e369fc 100644
--- a/tests/ColorMatrixTest.cpp
+++ b/tests/ColorMatrixTest.cpp
@@ -45,7 +45,7 @@
0.0f, 1.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 1.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f, 0.0f };
- paint.setColorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(blueToCyan));
+ paint.setColorFilter(SkColorMatrixFilter::Create(blueToCyan))->unref();
paint.setColor(SK_ColorBLUE);
canvas.drawPoint(0, 0, paint);
@@ -70,7 +70,7 @@
0.0f, 0.0f, 1.0f, 0.0f, 64.0f,
-0.5f, 0.0f, 0.0f, 1.0f, 0.0f
};
- paint.setColorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(transparentRedAddBlue));
+ paint.setColorFilter(SkColorMatrixFilter::Create(transparentRedAddBlue))->unref();
bitmap.eraseColor(SK_ColorTRANSPARENT);
paint.setColor(SK_ColorRED);
@@ -91,7 +91,7 @@
assert_color(reporter, SK_ColorCYAN, bitmap.getColor(0, 0));
// create a new filter with the changed matrix
- paint.setColorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(transparentRedAddBlue));
+ paint.setColorFilter(SkColorMatrixFilter::Create(transparentRedAddBlue))->unref();
canvas.drawPoint(0, 0, paint);
assert_color(reporter, SK_ColorBLUE, bitmap.getColor(0, 0));
}
« no previous file with comments | « tests/ColorFilterTest.cpp ('k') | tests/GpuColorFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698