diff options
author | Brian Salomon <bsalomon@google.com> | 2017-06-05 12:25:13 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-05 16:47:45 +0000 |
commit | 28207df02b3dee83141520adf23df2c6aa087860 (patch) | |
tree | fdb76a0617c00df12eb900a1c44a87eafaf87692 /tests/GrPorterDuffTest.cpp | |
parent | c1359888c021ad4594d22d849b2414fd0cdec6f5 (diff) |
Make GrSimpleMeshDrawOpHelper record whether coverage can be implemented as alpha
This also makes the blend table entry for opaque src over indicate a blend of (1, ISA) rather than (1, 0) to match the actual implementation of the global src-over XP.
Change-Id: I1b1f64d2546e4f0cf03c0239ce674d1baad655f6
Reviewed-on: https://skia-review.googlesource.com/18521
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tests/GrPorterDuffTest.cpp')
-rw-r--r-- | tests/GrPorterDuffTest.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/GrPorterDuffTest.cpp b/tests/GrPorterDuffTest.cpp index bf325981b4..78497d2b31 100644 --- a/tests/GrPorterDuffTest.cpp +++ b/tests/GrPorterDuffTest.cpp @@ -873,14 +873,15 @@ static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const Gr TEST_ASSERT(!xpi.fBlendInfo.fWriteColor); break; case SkBlendMode::kSrcOver: - TEST_ASSERT(xpi.fCanCombineOverlappedStencilAndCover); + // We don't specialize opaque src-over. See note in GrPorterDuffXferProcessor.cpp + TEST_ASSERT(!xpi.fCanCombineOverlappedStencilAndCover); TEST_ASSERT(!xpi.fIgnoresInputColor); - TEST_ASSERT(!xpi.fCompatibleWithCoverageAsAlpha); + TEST_ASSERT(xpi.fCompatibleWithCoverageAsAlpha); TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType); TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType); TEST_ASSERT(kAdd_GrBlendEquation == xpi.fBlendInfo.fEquation); TEST_ASSERT(kOne_GrBlendCoeff == xpi.fBlendInfo.fSrcBlend); - TEST_ASSERT(kZero_GrBlendCoeff == xpi.fBlendInfo.fDstBlend); + TEST_ASSERT(kISA_GrBlendCoeff == xpi.fBlendInfo.fDstBlend); TEST_ASSERT(xpi.fBlendInfo.fWriteColor); break; case SkBlendMode::kDstOver: |