aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-03-03 06:41:45 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-03-03 06:41:45 -0800
commitcff10b21a9934afc540d121b493b204335829589 (patch)
treef696624f21c4a45a052250cb9a18460e8aea0c0d /tests
parent3ebb16df938099dcbb6645ca08365e6d1dde8ddd (diff)
change colorfilter to return an array of frag processors
Diffstat (limited to 'tests')
-rw-r--r--tests/GpuColorFilterTest.cpp8
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();
}
}