Remove the skip-draw xp optimization
This seems like extra complexity for a impractical case. Also, if this is important a lot more work could be saved by catching this upstack (e.g. SkCanvas or SkPaintToGrPaint).
Change-Id: Ib47be9f3cdc8ce9e5b12d9e9eac5266f04c337a9
Reviewed-on: https://skia-review.googlesource.com/8949
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/tests/GrPorterDuffTest.cpp b/tests/GrPorterDuffTest.cpp
index d87e252..bfbd97e 100644
--- a/tests/GrPorterDuffTest.cpp
+++ b/tests/GrPorterDuffTest.cpp
@@ -58,7 +58,6 @@
enum {
kNone_OptFlags = GrXferProcessor::kNone_OptFlags,
- kSkipDraw_OptFlag = GrXferProcessor::kSkipDraw_OptFlag,
kIgnoreColor_OptFlag = GrXferProcessor::kIgnoreColor_OptFlag,
kCanTweakAlphaForCoverage_OptFlag = GrXferProcessor::kCanTweakAlphaForCoverage_OptFlag
};
@@ -127,8 +126,7 @@
break;
case SkBlendMode::kDst:
TEST_ASSERT(xpi.fReadsDst);
- TEST_ASSERT((kSkipDraw_OptFlag |
- kIgnoreColor_OptFlag |
+ TEST_ASSERT((kIgnoreColor_OptFlag |
kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kNone_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@@ -297,8 +295,7 @@
break;
case SkBlendMode::kDst:
TEST_ASSERT(xpi.fReadsDst);
- TEST_ASSERT((kSkipDraw_OptFlag |
- kIgnoreColor_OptFlag |
+ TEST_ASSERT((kIgnoreColor_OptFlag |
kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kNone_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@@ -468,8 +465,7 @@
break;
case SkBlendMode::kDst:
TEST_ASSERT(xpi.fReadsDst);
- TEST_ASSERT((kSkipDraw_OptFlag |
- kIgnoreColor_OptFlag |
+ TEST_ASSERT((kIgnoreColor_OptFlag |
kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kNone_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@@ -640,8 +636,7 @@
break;
case SkBlendMode::kDst:
TEST_ASSERT(xpi.fReadsDst);
- TEST_ASSERT((kSkipDraw_OptFlag |
- kIgnoreColor_OptFlag |
+ TEST_ASSERT((kIgnoreColor_OptFlag |
kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kNone_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@@ -682,8 +677,7 @@
break;
case SkBlendMode::kDstIn:
TEST_ASSERT(xpi.fReadsDst);
- TEST_ASSERT((kSkipDraw_OptFlag |
- kIgnoreColor_OptFlag |
+ TEST_ASSERT((kIgnoreColor_OptFlag |
kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kNone_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@@ -814,8 +808,7 @@
break;
case SkBlendMode::kDst:
TEST_ASSERT(xpi.fReadsDst);
- TEST_ASSERT((kSkipDraw_OptFlag |
- kIgnoreColor_OptFlag |
+ TEST_ASSERT((kIgnoreColor_OptFlag |
kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kNone_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@@ -856,8 +849,7 @@
break;
case SkBlendMode::kDstIn:
TEST_ASSERT(xpi.fReadsDst);
- TEST_ASSERT((kSkipDraw_OptFlag |
- kIgnoreColor_OptFlag |
+ TEST_ASSERT((kIgnoreColor_OptFlag |
kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kNone_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);