Revert "Revert "Remove GrPipeline from GrDrawOp.""
This reverts commit c48af934608bbb65650641f66adb51f2102d4274.
Change-Id: I4ba78fd7e5a7d406b88223ca6f7245c029b60f76
Reviewed-on: https://skia-review.googlesource.com/9981
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
index 8b35bb9..f984355 100644
--- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp
+++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
@@ -759,10 +759,11 @@
return new PorterDuffXferProcessor(blendFormula);
}
-bool GrPorterDuffXPFactory::willReadsDst(const FragmentProcessorAnalysis& analysis) const {
- BlendFormula colorFormula = gBlendTable[analysis.isOutputColorOpaque()][0][(int)fBlendMode];
+bool GrPorterDuffXPFactory::canCombineOverlappedStencilAndCover(bool colorIsOpaque) const {
+ // Ignore the effect of coverage here.
+ BlendFormula colorFormula = gBlendTable[colorIsOpaque][0][(int)fBlendMode];
SkASSERT(kAdd_GrBlendEquation == colorFormula.fBlendEquation);
- return (colorFormula.usesDstColor() || analysis.hasCoverage());
+ return !colorFormula.usesDstColor();
}
bool GrPorterDuffXPFactory::willReadDstInShader(const GrCaps& caps,
@@ -869,10 +870,6 @@
return sk_make_sp<PorterDuffXferProcessor>(formula);
}
-bool GrPorterDuffXPFactory::WillSrcOverReadDst(const FragmentProcessorAnalysis& analysis) {
- return analysis.hasCoverage() || !analysis.isOutputColorOpaque();
-}
-
bool GrPorterDuffXPFactory::WillSrcOverNeedDstTexture(const GrCaps& caps,
const FragmentProcessorAnalysis& analysis) {
if (caps.shaderCaps()->dstReadInShaderSupport() ||