diff options
author | 2014-10-02 12:12:48 -0700 | |
---|---|---|
committer | 2014-10-02 12:12:48 -0700 | |
commit | b4b7a4c9ea2e399db550f93e3754c351e5b2079a (patch) | |
tree | f67932963699b8dac498d3e67f70cc2c505c70a3 /tests | |
parent | 85d3427d4932c6cfaf02f8a7454f0c6f213b0c2e (diff) |
Revert of Add isSingleComponent bool to getConstantColorComponent (patchset #6 id:100001 of https://codereview.chromium.org/608253002/)
Reason for revert:
Changing some GMs
Original issue's description:
> Add isSingleComponent bool to getConstantColorComponent
>
> Initial step to allowing effects to use/output 1 or 4 color/coverage components. This cl doesn't change any current logic and all effects still assume they are working with 4 components.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3b8af078281a5a20f951b9fd84f38d92b8f6217b
TBR=joshualitt@chromium.org,bsalomon@google.com,reed@google.com,egdaniel@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/617853003
Diffstat (limited to 'tests')
-rw-r--r-- | tests/GpuColorFilterTest.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/GpuColorFilterTest.cpp b/tests/GpuColorFilterTest.cpp index a61fe0b545..202756b0e6 100644 --- a/tests/GpuColorFilterTest.cpp +++ b/tests/GpuColorFilterTest.cpp @@ -99,14 +99,12 @@ 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)); - GrProcessor::InvariantOutput inout; - inout.fColor = test.inputColor; - inout.fValidFlags = test.inputComponents; - inout.fIsSingleComponent = false; - effect->computeInvariantOutput(&inout); - - REPORTER_ASSERT(reporter, filterColor(inout.fColor, inout.fValidFlags) == test.outputColor); - REPORTER_ASSERT(reporter, test.outputComponents == inout.fValidFlags); + 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); } } |