diff options
author | 2015-03-03 06:41:45 -0800 | |
---|---|---|
committer | 2015-03-03 06:41:45 -0800 | |
commit | cff10b21a9934afc540d121b493b204335829589 (patch) | |
tree | f696624f21c4a45a052250cb9a18460e8aea0c0d /tests | |
parent | 3ebb16df938099dcbb6645ca08365e6d1dde8ddd (diff) |
change colorfilter to return an array of frag processors
BUG=skia:
Review URL: https://codereview.chromium.org/973593002
Diffstat (limited to 'tests')
-rw-r--r-- | tests/GpuColorFilterTest.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/GpuColorFilterTest.cpp b/tests/GpuColorFilterTest.cpp index bf0ba3046a..037734eebc 100644 --- a/tests/GpuColorFilterTest.cpp +++ b/tests/GpuColorFilterTest.cpp @@ -99,14 +99,18 @@ 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)); - SkAutoTUnref<GrFragmentProcessor> effect(cf->asFragmentProcessor(grContext)); + SkTDArray<GrFragmentProcessor*> array; + bool hasFrag = cf->asFragmentProcessors(grContext, &array); + REPORTER_ASSERT(reporter, hasFrag); + REPORTER_ASSERT(reporter, 1 == array.count()); GrInvariantOutput inout(test.inputColor, static_cast<GrColorComponentFlags>(test.inputComponents), false); - effect->computeInvariantOutput(&inout); + array[0]->computeInvariantOutput(&inout); REPORTER_ASSERT(reporter, filterColor(inout.color(), inout.validFlags()) == test.outputColor); REPORTER_ASSERT(reporter, test.outputComponents == inout.validFlags()); + array[0]->unref(); } } |