Index: src/gpu/effects/GrPorterDuffXferProcessor.cpp |
diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp |
index 69e77cfc48348efe741b717ee11f31bd3b4eb1e5..7c9a130ec62f7049578ce317967194e879f97ca6 100644 |
--- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp |
+++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp |
@@ -747,6 +747,9 @@ GrPorterDuffXPFactory::onCreateXferProcessor(const GrCaps& caps, |
const GrPipelineOptimizations& optimizations, |
bool hasMixedSamples, |
const DstTexture* dstTexture) const { |
+ if (optimizations.fOverrides.fUsePLSDstRead) { |
bsalomon
2016/01/04 15:33:47
Maybe time to rename GrPipelineOptimizations... se
|
+ return new ShaderPDXferProcessor(dstTexture, hasMixedSamples, fXfermode); |
+ } |
BlendFormula blendFormula; |
if (optimizations.fCoveragePOI.isFourChannelOutput()) { |
if (SkXfermode::kSrcOver_Mode == fXfermode && |
@@ -806,6 +809,9 @@ void GrPorterDuffXPFactory::getInvariantBlendedColor(const GrProcOptInfo& colorP |
bool GrPorterDuffXPFactory::willReadDstColor(const GrCaps& caps, |
const GrPipelineOptimizations& optimizations, |
bool hasMixedSamples) const { |
+ if (optimizations.fOverrides.fUsePLSDstRead) { |
+ return true; |
+ } |
if (caps.shaderCaps()->dualSourceBlendingSupport()) { |
return false; |
} |
@@ -856,6 +862,9 @@ GrXferProcessor* GrPorterDuffXPFactory::CreateSrcOverXferProcessor( |
const GrPipelineOptimizations& optimizations, |
bool hasMixedSamples, |
const GrXferProcessor::DstTexture* dstTexture) { |
+ if (optimizations.fOverrides.fUsePLSDstRead) { |
+ return new ShaderPDXferProcessor(dstTexture, hasMixedSamples, SkXfermode::kSrcOver_Mode); |
+ } |
if (!optimizations.fCoveragePOI.isFourChannelOutput() && |
!(optimizations.fCoveragePOI.isSolidWhite() && |
!hasMixedSamples && |