Index: tests/GpuColorFilterTest.cpp |
diff --git a/tests/GpuColorFilterTest.cpp b/tests/GpuColorFilterTest.cpp |
index 202756b0e6926e14955bbc8563f5d5151f5829f4..bf47266117568e1ac3716b5f23e805884ee14b50 100644 |
--- a/tests/GpuColorFilterTest.cpp |
+++ b/tests/GpuColorFilterTest.cpp |
@@ -99,12 +99,15 @@ static void test_getConstantColorComponents(skiatest::Reporter* reporter, GrCont |
const GetConstantComponentTestCase& test = filterTests[i]; |
SkAutoTUnref<SkColorFilter> cf(SkColorFilter::CreateModeFilter(test.filterColor, test.filterMode)); |
SkAutoTUnref<GrFragmentProcessor> effect(cf->asFragmentProcessor(grContext)); |
- GrColor color = test.inputColor; |
- uint32_t components = test.inputComponents; |
- effect->getConstantColorComponents(&color, &components); |
- |
- REPORTER_ASSERT(reporter, filterColor(color, components) == test.outputColor); |
- REPORTER_ASSERT(reporter, test.outputComponents == components); |
+ GrProcessor::InvarientOutput invarientOutput; |
+ invarientOutput.color = test.inputColor; |
+ invarientOutput.validFlags = test.inputComponents; |
+ invarientOutput.isSingleComponent = false; |
+ effect->computeInvarientOutput(&invarientOutput); |
+ |
+ REPORTER_ASSERT(reporter, filterColor(invarientOutput.color, invarientOutput.validFlags) == |
+ test.outputColor); |
+ REPORTER_ASSERT(reporter, test.outputComponents == invarientOutput.validFlags); |
} |
} |