From 28207df02b3dee83141520adf23df2c6aa087860 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Mon, 5 Jun 2017 12:25:13 -0400 Subject: 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 Commit-Queue: Brian Salomon --- tests/GrPorterDuffTest.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/GrPorterDuffTest.cpp') 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: -- cgit v1.2.3