| Index: src/gpu/effects/GrPorterDuffXferProcessor.cpp
|
| diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
|
| index bc61f499e42ba3263af5f57d7f4ed817f3ef7d7e..de0143aceaf72346f818ddce9b71278a5e812aef 100644
|
| --- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp
|
| +++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
|
| @@ -744,16 +744,11 @@
|
| void GrPorterDuffXPFactory::getInvariantOutput(const GrProcOptInfo& colorPOI,
|
| const GrProcOptInfo& coveragePOI,
|
| GrXPFactory::InvariantOutput* output) const {
|
| - output->fWillBlendWithDst = true;
|
| - output->fBlendedColorFlags = kNone_GrColorComponentFlags;
|
| -
|
| - // The LCD coverage XP doesn't use the blend table, and has no invariant output.
|
| - if (coveragePOI.isFourChannelOutput()) {
|
| - return;
|
| - }
|
| -
|
| const BlendFormula& blendFormula = get_blend_formula(fXfermode, colorPOI, coveragePOI);
|
| +
|
| if (blendFormula.usesDstColor()) {
|
| + output->fWillBlendWithDst = true;
|
| + output->fBlendedColorFlags = kNone_GrColorComponentFlags;
|
| return;
|
| }
|
|
|
| @@ -773,18 +768,16 @@
|
| output->fBlendedColorFlags = colorPOI.validFlags();
|
| return;
|
|
|
| - default: return;
|
| + // TODO: update if we ever use const color.
|
| + default:
|
| + output->fBlendedColorFlags = kNone_GrColorComponentFlags;
|
| + return;
|
| }
|
| }
|
|
|
| bool GrPorterDuffXPFactory::willReadDstColor(const GrCaps& caps,
|
| const GrProcOptInfo& colorPOI,
|
| const GrProcOptInfo& coveragePOI) const {
|
| - // The LCD coverage XP doesn't use the blend table, and never requires a dst read.
|
| - if (coveragePOI.isFourChannelOutput()) {
|
| - return false;
|
| - }
|
| -
|
| // Some formulas use dual source blending, so we fall back if it is required but not supported.
|
| return !caps.shaderCaps()->dualSourceBlendingSupport() &&
|
| get_blend_formula(fXfermode, colorPOI, coveragePOI).hasSecondaryOutput();
|
|
|