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

Unified Diff: tests/GpuColorFilterTest.cpp

Issue 1368423003: Use child processors to implement compose color filter. (Closed) Base URL: https://skia.googlesource.com/skia.git@upm
Patch Set: update comment Created 5 years, 3 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
« src/gpu/SkGr.cpp ('K') | « src/gpu/SkGr.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/GpuColorFilterTest.cpp
diff --git a/tests/GpuColorFilterTest.cpp b/tests/GpuColorFilterTest.cpp
index a99e91b8240a5a483d1971a09dc1fb59daf31464..09ac2a8d7a0e6b8c880972b91f9bf8325f53368c 100644
--- a/tests/GpuColorFilterTest.cpp
+++ b/tests/GpuColorFilterTest.cpp
@@ -101,18 +101,14 @@ static void test_getConstantColorComponents(skiatest::Reporter* reporter, GrCont
for (size_t i = 0; i < SK_ARRAY_COUNT(filterTests); ++i) {
const GetConstantComponentTestCase& test = filterTests[i];
SkAutoTUnref<SkColorFilter> cf(SkColorFilter::CreateModeFilter(test.filterColor, test.filterMode));
- SkTDArray<const GrFragmentProcessor*> array;
- bool hasFrag = cf->asFragmentProcessors(grContext, paint.getProcessorDataManager(), &array);
- REPORTER_ASSERT(reporter, hasFrag);
- REPORTER_ASSERT(reporter, 1 == array.count());
+ SkAutoTUnref<const GrFragmentProcessor> fp(cf->asFragmentProcessor(grContext, paint.getProcessorDataManager()));
egdaniel 2015/09/29 13:23:52 100 chars
bsalomon 2015/09/29 13:31:43 "Fixed" along with surrounding code.
+ REPORTER_ASSERT(reporter, fp);
GrInvariantOutput inout(test.inputColor,
static_cast<GrColorComponentFlags>(test.inputComponents),
false);
- array[0]->computeInvariantOutput(&inout);
-
+ fp->computeInvariantOutput(&inout);
REPORTER_ASSERT(reporter, filterColor(inout.color(), inout.validFlags()) == test.outputColor);
REPORTER_ASSERT(reporter, test.outputComponents == inout.validFlags());
- array[0]->unref();
}
}
« src/gpu/SkGr.cpp ('K') | « src/gpu/SkGr.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698