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

Unified Diff: tests/ImageFilterTest.cpp

Issue 175293002: Factory methods for heap-allocated SkColorFilter objects. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 10 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/GLProgramsTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageFilterTest.cpp
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index 41af2437826b2181adf34c0d853c2e97dd9104da..96dc9599503e2da440f2272e7cec83ba03dfd7ff 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -108,7 +108,7 @@ static SkImageFilter* make_scale(float amount, SkImageFilter* input = NULL) {
0, s, 0, 0, 0,
0, 0, s, 0, 0,
0, 0, 0, s, 0 };
- SkAutoTUnref<SkColorFilter> filter(new SkColorMatrixFilter(matrix));
+ SkAutoTUnref<SkColorFilter> filter(SkColorMatrixFilter::Create(matrix));
return SkColorFilterImageFilter::Create(filter, input);
}
@@ -119,7 +119,7 @@ static SkImageFilter* make_grayscale(SkImageFilter* input = NULL, const SkImageF
matrix[1] = matrix[6] = matrix[11] = 0.7152f;
matrix[2] = matrix[7] = matrix[12] = 0.0722f;
matrix[18] = 1.0f;
- SkAutoTUnref<SkColorFilter> filter(new SkColorMatrixFilter(matrix));
+ SkAutoTUnref<SkColorFilter> filter(SkColorMatrixFilter::Create(matrix));
return SkColorFilterImageFilter::Create(filter, input, cropRect);
}
« no previous file with comments | « tests/GLProgramsTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698