aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2014-10-13 12:53:46 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-13 12:53:46 -0700
commitccb2e384a036f29d989d3c1468f879324e81a678 (patch)
tree27e38ca2ad78e3a0f741a1cc6c23899eb22b822c /tests
parentcad5d3e264535c919b80e1e2a85407307961f221 (diff)
Create helper functions to use in computeInvariantOutput calls
Diffstat (limited to 'tests')
-rw-r--r--tests/GpuColorFilterTest.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/GpuColorFilterTest.cpp b/tests/GpuColorFilterTest.cpp
index a61fe0b545..90f22208d7 100644
--- a/tests/GpuColorFilterTest.cpp
+++ b/tests/GpuColorFilterTest.cpp
@@ -100,13 +100,11 @@ static void test_getConstantColorComponents(skiatest::Reporter* reporter, GrCont
SkAutoTUnref<SkColorFilter> cf(SkColorFilter::CreateModeFilter(test.filterColor, test.filterMode));
SkAutoTUnref<GrFragmentProcessor> effect(cf->asFragmentProcessor(grContext));
GrProcessor::InvariantOutput inout;
- inout.fColor = test.inputColor;
- inout.fValidFlags = test.inputComponents;
- inout.fIsSingleComponent = false;
+ inout.setToOther(test.inputComponents, test.inputColor);
effect->computeInvariantOutput(&inout);
- REPORTER_ASSERT(reporter, filterColor(inout.fColor, inout.fValidFlags) == test.outputColor);
- REPORTER_ASSERT(reporter, test.outputComponents == inout.fValidFlags);
+ REPORTER_ASSERT(reporter, filterColor(inout.color(), inout.validFlags()) == test.outputColor);
+ REPORTER_ASSERT(reporter, test.outputComponents == inout.validFlags());
}
}