Index: src/gpu/effects/GrCoverageSetOpXP.cpp |
diff --git a/src/gpu/effects/GrCoverageSetOpXP.cpp b/src/gpu/effects/GrCoverageSetOpXP.cpp |
index 7761a6445ac14f91c2fda6984a387cc916ec2a27..abf4be0aa09de43d7879a9f4cc944fad475b954f 100644 |
--- a/src/gpu/effects/GrCoverageSetOpXP.cpp |
+++ b/src/gpu/effects/GrCoverageSetOpXP.cpp |
@@ -9,6 +9,7 @@ |
#include "effects/GrCoverageSetOpXP.h" |
#include "GrCaps.h" |
#include "GrColor.h" |
+#include "GrPipeline.h" |
#include "GrProcessor.h" |
#include "GrProcOptInfo.h" |
#include "glsl/GrGLSLBlend.h" |
@@ -151,7 +152,6 @@ class ShaderCSOXferProcessor : public GrXferProcessor { |
public: |
ShaderCSOXferProcessor(const DstTexture* dstTexture, |
bool hasMixedSamples, |
- SkXfermode::Mode xfermode, |
SkRegion::Op regionOp, |
bool invertCoverage) |
: INHERITED(dstTexture, true, hasMixedSamples) |
@@ -310,11 +310,17 @@ GrXPFactory* GrCoverageSetOpXPFactory::Create(SkRegion::Op regionOp, bool invert |
} |
} |
+bool GrCoverageSetOpXPFactory::willReadDstColor(const GrCaps& caps, |
+ const GrPipelineOptimizations& optimizations, |
+ bool hasMixedSamples) const { |
+ return optimizations.fOverrides.fUsePLSDstRead; |
egdaniel
2016/01/13 21:47:19
I am slightly worried about the need to check PLS
|
+} |
+ |
GrXferProcessor* |
GrCoverageSetOpXPFactory::onCreateXferProcessor(const GrCaps& caps, |
const GrPipelineOptimizations& optimizations, |
bool hasMixedSamples, |
- const DstTexture* dst) const { |
+ const DstTexture* dst) const { |
egdaniel
2016/01/13 21:47:19
extra spaces
|
// We don't support inverting coverage with mixed samples. We don't expect to ever want this in |
// the future, however we could at some point make this work using an inverted coverage |
// modulation table. Note that an inverted table still won't work if there are coverage procs. |
@@ -323,6 +329,9 @@ GrCoverageSetOpXPFactory::onCreateXferProcessor(const GrCaps& caps, |
return nullptr; |
} |
+ if (optimizations.fOverrides.fUsePLSDstRead) { |
+ return new ShaderCSOXferProcessor(dst, hasMixedSamples, fRegionOp, fInvertCoverage); |
+ } |
return CoverageSetOpXP::Create(fRegionOp, fInvertCoverage); |
} |