Simplify GrPaint::isConstantBlendedColor to avoid FP analysis and XP virtual calls

This was the only non-test user of GrXPFactory::isConstantPreCoverageBlendedColor which is now removed.

Change-Id: Ic1c130d30a44e1a955b89f8912433a3c9df2e61e
Reviewed-on: https://skia-review.googlesource.com/8776
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
Brian Salomon 2017-02-21 11:31:40 -05:00 committed by Skia Commit-Bot
parent 4eabd5d88a
commit 00b2cca300
10 changed files with 15 additions and 166 deletions

View File

@ -149,15 +149,22 @@ public:
* not seem constant, even if this function returns true.
*/
bool isConstantBlendedColor(GrColor* constantColor) const {
GrColor paintColor = this->getColor();
if (!fXPFactory && fColorFragmentProcessors.empty()) {
if (!GrColorIsOpaque(paintColor)) {
return false;
}
*constantColor = paintColor;
// This used to do a more sophisticated analysis but now it just explicitly looks for common
// cases.
static const GrXPFactory* kSrc = GrPorterDuffXPFactory::Get(SkBlendMode::kSrc);
static const GrXPFactory* kClear = GrPorterDuffXPFactory::Get(SkBlendMode::kClear);
if (kClear == fXPFactory) {
*constantColor = GrColor_TRANSPARENT_BLACK;
return true;
}
return this->internalIsConstantBlendedColor(paintColor, constantColor);
if (this->numColorFragmentProcessors()) {
return false;
}
if (kSrc == fXPFactory || (!fXPFactory && fColor.isOpaque())) {
*constantColor = fColor.toGrColor();
return true;
}
return false;
}
private:
@ -183,8 +190,6 @@ private:
friend class GrProcessorSet;
bool internalIsConstantBlendedColor(GrColor paintColor, GrColor* constantColor) const;
const GrXPFactory* fXPFactory = nullptr;
SkSTArray<4, sk_sp<GrFragmentProcessor>> fColorFragmentProcessors;
SkSTArray<2, sk_sp<GrFragmentProcessor>> fCoverageFragmentProcessors;

View File

@ -328,17 +328,7 @@ public:
static bool WillReadDst(const GrXPFactory*, const GrProcOptInfo& colorInput,
const GrProcOptInfo& coverageInput);
/**
* Most of the time GrXferProcessor performs a blend of the src and dst colors and then applies
* the coverage using c*b + (1-c)*d where c is coverage, b=F(s,d) is the blended color, s is the
* source color, and d is the destination color. This query answers the question "is b a
* constant and if so what is its value?" If the XP ignores the source color or applies the
* coverage in some other fashion then this returns false.
*/
static bool IsPreCoverageBlendedColorConstant(const GrXPFactory*,
const GrProcOptInfo& colorInput, GrColor* color);
/**
/**
* This will return true if the xfer processor needs the dst color in the shader and the way
* that the color will be made available to the xfer processor is by sampling a texture.
*/
@ -356,10 +346,6 @@ protected:
}
private:
/** Subclass-specific implementation of IsPreCoverageBlendedColorConstant(). */
virtual bool isPreCoverageBlendedColorConstant(const GrProcOptInfo& colorInput,
GrColor* color) const = 0;
/** Subclass-specific implementation of WillReadDst(). */
virtual bool willReadsDst(const GrProcOptInfo& colorInput,
const GrProcOptInfo& coverageInput) const = 0;

View File

@ -32,10 +32,6 @@ public:
private:
constexpr GrCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCoverage);
bool isPreCoverageBlendedColorConstant(const GrProcOptInfo&, GrColor*) const override {
return false;
}
bool willReadsDst(const GrProcOptInfo&, const GrProcOptInfo&) const override {
return fRegionOp != SkRegion::kReplace_Op;
}

View File

@ -47,7 +47,6 @@ public:
private:
constexpr GrPorterDuffXPFactory(SkBlendMode);
bool isPreCoverageBlendedColorConstant(const GrProcOptInfo&, GrColor*) const override;
bool willReadsDst(const GrProcOptInfo&, const GrProcOptInfo&) const override;
GrXferProcessor* onCreateXferProcessor(const GrCaps& caps,

View File

@ -74,12 +74,3 @@ void GrPaint::addCoverageTextureProcessor(GrContext* ctx, sk_sp<GrTextureProxy>
this->addCoverageFragmentProcessor(GrSimpleTextureEffect::Make(ctx, std::move(proxy),
nullptr, matrix, params));
}
bool GrPaint::internalIsConstantBlendedColor(GrColor paintColor, GrColor* color) const {
GrProcOptInfo colorProcInfo((GrPipelineInput(paintColor)));
colorProcInfo.analyzeProcessors(
sk_sp_address_as_pointer_address(fColorFragmentProcessors.begin()),
this->numColorFragmentProcessors());
return GrXPFactory::IsPreCoverageBlendedColorConstant(fXPFactory, colorProcInfo, color);
}

View File

@ -211,15 +211,6 @@ bool GrXPFactory::WillReadDst(const GrXPFactory* factory, const GrProcOptInfo& c
return GrPorterDuffXPFactory::WillSrcOverReadDst(colorInput, coverageInput);
}
bool GrXPFactory::IsPreCoverageBlendedColorConstant(const GrXPFactory* factory,
const GrProcOptInfo& colorInput,
GrColor* color) {
if (factory) {
return factory->isPreCoverageBlendedColorConstant(colorInput, color);
}
return GrPorterDuffXPFactory::IsSrcOverPreCoverageBlendedColorConstant(colorInput, color);
}
bool GrXPFactory::willReadDstInShader(const GrCaps& caps,
const GrPipelineAnalysis& analysis) const {
if (analysis.fUsesPLSDstRead) {

View File

@ -338,11 +338,6 @@ private:
bool hasMixedSamples,
const DstTexture*) const override;
bool isPreCoverageBlendedColorConstant(const GrProcOptInfo& colorInput,
GrColor* color) const override {
return false;
}
bool willReadsDst(const GrProcOptInfo&, const GrProcOptInfo&) const override { return true; }
bool willReadDstInShader(const GrCaps&, ColorType, CoverageType) const override;

View File

@ -24,10 +24,6 @@ public:
static const GrXPFactory* Get();
private:
bool isPreCoverageBlendedColorConstant(const GrProcOptInfo&, GrColor*) const override {
return false;
}
bool willReadsDst(const GrProcOptInfo& colorInput,
const GrProcOptInfo& coverageInput) const override {
return false;

View File

@ -765,23 +765,6 @@ GrXferProcessor* GrPorterDuffXPFactory::onCreateXferProcessor(const GrCaps& caps
SkASSERT(!dstTexture || !dstTexture->texture());
return new PorterDuffXferProcessor(blendFormula);
}
bool GrPorterDuffXPFactory::isPreCoverageBlendedColorConstant(const GrProcOptInfo& colorInput,
GrColor* color) const {
BlendFormula colorFormula = gBlendTable[colorInput.isOpaque()][0][(int)fBlendMode];
SkASSERT(kAdd_GrBlendEquation == colorFormula.fBlendEquation);
if (colorFormula.usesDstColor()) {
return false;
}
switch (colorFormula.fSrcCoeff) {
case kZero_GrBlendCoeff:
*color = GrColor_TRANSPARENT_BLACK;
return true;
case kOne_GrBlendCoeff:
return colorInput.hasKnownOutputColor(color);
default:
return false;
}
}
bool GrPorterDuffXPFactory::willReadsDst(const GrProcOptInfo& colorInput,
const GrProcOptInfo& coverageInput) const {

View File

@ -69,8 +69,6 @@ public:
const GrPipelineAnalysis& analysis) {
const GrXPFactory* xpf = GrPorterDuffXPFactory::Get(xfermode);
fReadsDst = GrXPFactory::WillReadDst(xpf, analysis.fColorPOI, analysis.fCoveragePOI);
fHasConstantPreCoverageBlendedColor = GrXPFactory::IsPreCoverageBlendedColorConstant(
xpf, analysis.fColorPOI, &fPreCoverageBlendedColor);
sk_sp<GrXferProcessor> xp(xpf->createXferProcessor(analysis, false, nullptr, caps));
TEST_ASSERT(!xpf->willNeedDstTexture(caps, analysis));
GrColor ignoredOverrideColor;
@ -82,8 +80,6 @@ public:
}
bool fReadsDst;
bool fHasConstantPreCoverageBlendedColor;
GrColor fPreCoverageBlendedColor;
int fOptFlags;
int fPrimaryOutputType;
int fSecondaryOutputType;
@ -111,8 +107,6 @@ static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps)
switch (xfermode) {
case SkBlendMode::kClear:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(GrColor_TRANSPARENT_BLACK == xpi.fPreCoverageBlendedColor);
TEST_ASSERT((kIgnoreColor_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kCoverage_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -123,7 +117,6 @@ static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps)
break;
case SkBlendMode::kSrc:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kCoverage_OutputType == xpi.fSecondaryOutputType);
@ -134,7 +127,6 @@ static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps)
break;
case SkBlendMode::kDst:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kSkipDraw_OptFlag |
kIgnoreColor_OptFlag |
kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
@ -147,7 +139,6 @@ static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps)
break;
case SkBlendMode::kSrcOver:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kSAModulate_OutputType == xpi.fSecondaryOutputType);
@ -158,7 +149,6 @@ static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps)
break;
case SkBlendMode::kDstOver:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -169,7 +159,6 @@ static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps)
break;
case SkBlendMode::kSrcIn:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kCoverage_OutputType == xpi.fSecondaryOutputType);
@ -180,7 +169,6 @@ static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps)
break;
case SkBlendMode::kDstIn:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kISAModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -191,7 +179,6 @@ static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps)
break;
case SkBlendMode::kSrcOut:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kCoverage_OutputType == xpi.fSecondaryOutputType);
@ -202,7 +189,6 @@ static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps)
break;
case SkBlendMode::kDstOut:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kSAModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -213,7 +199,6 @@ static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps)
break;
case SkBlendMode::kSrcATop:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kSAModulate_OutputType == xpi.fSecondaryOutputType);
@ -224,7 +209,6 @@ static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps)
break;
case SkBlendMode::kDstATop:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kISAModulate_OutputType == xpi.fSecondaryOutputType);
@ -235,7 +219,6 @@ static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps)
break;
case SkBlendMode::kXor:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kSAModulate_OutputType == xpi.fSecondaryOutputType);
@ -246,7 +229,6 @@ static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps)
break;
case SkBlendMode::kPlus:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -257,7 +239,6 @@ static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps)
break;
case SkBlendMode::kModulate:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kISCModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -268,7 +249,6 @@ static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps)
break;
case SkBlendMode::kScreen:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -297,8 +277,6 @@ static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const
switch (xfermode) {
case SkBlendMode::kClear:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(GrColor_TRANSPARENT_BLACK == xpi.fPreCoverageBlendedColor);
TEST_ASSERT((kIgnoreColor_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kCoverage_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -309,7 +287,6 @@ static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kSrc:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kCoverage_OutputType == xpi.fSecondaryOutputType);
@ -320,7 +297,6 @@ static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kDst:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kSkipDraw_OptFlag |
kIgnoreColor_OptFlag |
kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
@ -333,7 +309,6 @@ static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kSrcOver:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -344,7 +319,6 @@ static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kDstOver:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -355,7 +329,6 @@ static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kSrcIn:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kCoverage_OutputType == xpi.fSecondaryOutputType);
@ -366,7 +339,6 @@ static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kDstIn:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kISAModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -377,7 +349,6 @@ static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kSrcOut:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kCoverage_OutputType == xpi.fSecondaryOutputType);
@ -388,7 +359,6 @@ static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kDstOut:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -399,7 +369,6 @@ static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kSrcATop:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -410,7 +379,6 @@ static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kDstATop:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kISAModulate_OutputType == xpi.fSecondaryOutputType);
@ -421,7 +389,6 @@ static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kXor:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -432,7 +399,6 @@ static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kPlus:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -443,7 +409,6 @@ static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kModulate:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kISCModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -454,7 +419,6 @@ static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kScreen:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -486,8 +450,6 @@ static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const G
switch (xfermode) {
case SkBlendMode::kClear:
TEST_ASSERT(!xpi.fReadsDst);
TEST_ASSERT(xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(GrColor_TRANSPARENT_BLACK == xpi.fPreCoverageBlendedColor);
TEST_ASSERT(kIgnoreColor_OptFlag == xpi.fOptFlags);
TEST_ASSERT(kNone_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -498,11 +460,6 @@ static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const G
break;
case SkBlendMode::kSrc:
TEST_ASSERT(!xpi.fReadsDst);
TEST_ASSERT(xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(229 == GrColorUnpackR(xpi.fPreCoverageBlendedColor));
TEST_ASSERT(0 == GrColorUnpackG(xpi.fPreCoverageBlendedColor));
TEST_ASSERT(154 == GrColorUnpackB(xpi.fPreCoverageBlendedColor));
TEST_ASSERT(240 == GrColorUnpackA(xpi.fPreCoverageBlendedColor));
TEST_ASSERT(kNone_OptFlags == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -513,7 +470,6 @@ static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const G
break;
case SkBlendMode::kDst:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kSkipDraw_OptFlag |
kIgnoreColor_OptFlag |
kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
@ -526,7 +482,6 @@ static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const G
break;
case SkBlendMode::kSrcOver:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -537,7 +492,6 @@ static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const G
break;
case SkBlendMode::kDstOver:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kCanTweakAlphaForCoverage_OptFlag == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -548,7 +502,6 @@ static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const G
break;
case SkBlendMode::kSrcIn:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kNone_OptFlags == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -559,7 +512,6 @@ static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const G
break;
case SkBlendMode::kDstIn:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kNone_OptFlags == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -570,7 +522,6 @@ static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const G
break;
case SkBlendMode::kSrcOut:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kNone_OptFlags == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -581,7 +532,6 @@ static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const G
break;
case SkBlendMode::kDstOut:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kCanTweakAlphaForCoverage_OptFlag == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -592,7 +542,6 @@ static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const G
break;
case SkBlendMode::kSrcATop:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kCanTweakAlphaForCoverage_OptFlag == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -603,7 +552,6 @@ static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const G
break;
case SkBlendMode::kDstATop:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kNone_OptFlags == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -614,7 +562,6 @@ static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const G
break;
case SkBlendMode::kXor:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kCanTweakAlphaForCoverage_OptFlag == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -625,7 +572,6 @@ static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const G
break;
case SkBlendMode::kPlus:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kCanTweakAlphaForCoverage_OptFlag == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -636,7 +582,6 @@ static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const G
break;
case SkBlendMode::kModulate:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kNone_OptFlags == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -647,7 +592,6 @@ static void test_color_unknown_no_coverage(skiatest::Reporter* reporter, const G
break;
case SkBlendMode::kScreen:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kCanTweakAlphaForCoverage_OptFlag == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -678,8 +622,6 @@ static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const
switch (xfermode) {
case SkBlendMode::kClear:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(GrColor_TRANSPARENT_BLACK == xpi.fPreCoverageBlendedColor);
TEST_ASSERT((kIgnoreColor_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kCoverage_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -690,7 +632,6 @@ static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kSrc:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -701,7 +642,6 @@ static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kDst:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kSkipDraw_OptFlag |
kIgnoreColor_OptFlag |
kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
@ -714,7 +654,6 @@ static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kSrcOver:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -725,7 +664,6 @@ static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kDstOver:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -736,7 +674,6 @@ static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kSrcIn:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -747,7 +684,6 @@ static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kDstIn:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kSkipDraw_OptFlag |
kIgnoreColor_OptFlag |
kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
@ -760,7 +696,6 @@ static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kSrcOut:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -771,8 +706,6 @@ static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kDstOut:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(GrColor_TRANSPARENT_BLACK == xpi.fPreCoverageBlendedColor);
TEST_ASSERT((kIgnoreColor_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kCoverage_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -783,7 +716,6 @@ static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kSrcATop:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -794,7 +726,6 @@ static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kDstATop:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -805,7 +736,6 @@ static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kXor:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -816,7 +746,6 @@ static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kPlus:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -827,7 +756,6 @@ static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kModulate:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kNone_OptFlags) == xpi.fOptFlags);
TEST_ASSERT(kISCModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -838,7 +766,6 @@ static void test_color_opaque_with_coverage(skiatest::Reporter* reporter, const
break;
case SkBlendMode::kScreen:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -871,8 +798,6 @@ static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const Gr
switch (xfermode) {
case SkBlendMode::kClear:
TEST_ASSERT(!xpi.fReadsDst);
TEST_ASSERT(xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(GrColor_TRANSPARENT_BLACK == xpi.fPreCoverageBlendedColor);
TEST_ASSERT(kIgnoreColor_OptFlag == xpi.fOptFlags);
TEST_ASSERT(kNone_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -883,7 +808,6 @@ static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const Gr
break;
case SkBlendMode::kSrc:
TEST_ASSERT(!xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kNone_OptFlags == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -894,7 +818,6 @@ static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const Gr
break;
case SkBlendMode::kDst:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kSkipDraw_OptFlag |
kIgnoreColor_OptFlag |
kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
@ -907,8 +830,6 @@ static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const Gr
break;
case SkBlendMode::kSrcOver:
TEST_ASSERT(!xpi.fReadsDst);
// We don't really track per-component blended output anymore.
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kNone_OptFlags == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -919,7 +840,6 @@ static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const Gr
break;
case SkBlendMode::kDstOver:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kCanTweakAlphaForCoverage_OptFlag == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -930,7 +850,6 @@ static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const Gr
break;
case SkBlendMode::kSrcIn:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kNone_OptFlags == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -941,7 +860,6 @@ static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const Gr
break;
case SkBlendMode::kDstIn:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT((kSkipDraw_OptFlag |
kIgnoreColor_OptFlag |
kCanTweakAlphaForCoverage_OptFlag) == xpi.fOptFlags);
@ -954,7 +872,6 @@ static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const Gr
break;
case SkBlendMode::kSrcOut:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kNone_OptFlags == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -965,8 +882,6 @@ static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const Gr
break;
case SkBlendMode::kDstOut:
TEST_ASSERT(!xpi.fReadsDst);
TEST_ASSERT(xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(GrColor_TRANSPARENT_BLACK == xpi.fPreCoverageBlendedColor);
TEST_ASSERT(kIgnoreColor_OptFlag == xpi.fOptFlags);
TEST_ASSERT(kNone_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -977,7 +892,6 @@ static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const Gr
break;
case SkBlendMode::kSrcATop:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kNone_OptFlags == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -988,7 +902,6 @@ static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const Gr
break;
case SkBlendMode::kDstATop:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kCanTweakAlphaForCoverage_OptFlag == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -999,7 +912,6 @@ static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const Gr
break;
case SkBlendMode::kXor:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kNone_OptFlags == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -1010,7 +922,6 @@ static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const Gr
break;
case SkBlendMode::kPlus:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kCanTweakAlphaForCoverage_OptFlag == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -1021,7 +932,6 @@ static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const Gr
break;
case SkBlendMode::kModulate:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kNone_OptFlags == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -1032,7 +942,6 @@ static void test_color_opaque_no_coverage(skiatest::Reporter* reporter, const Gr
break;
case SkBlendMode::kScreen:
TEST_ASSERT(xpi.fReadsDst);
TEST_ASSERT(!xpi.fHasConstantPreCoverageBlendedColor);
TEST_ASSERT(kCanTweakAlphaForCoverage_OptFlag == xpi.fOptFlags);
TEST_ASSERT(kModulate_OutputType == xpi.fPrimaryOutputType);
TEST_ASSERT(kNone_OutputType == xpi.fSecondaryOutputType);
@ -1090,9 +999,7 @@ static void test_lcd_coverage_fallback_case(skiatest::Reporter* reporter, const
return;
}
GrColor color;
TEST_ASSERT(GrXPFactory::WillReadDst(xpf, colorPOI, covPOI));
TEST_ASSERT(!GrXPFactory::IsPreCoverageBlendedColorConstant(xpf, colorPOI, &color));
GrColor overrideColor;
xp->getOptimizations(analysis, false, &overrideColor, caps);