Index: src/gpu/effects/GrPorterDuffXferProcessor.cpp |
diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp |
index c443e1e9925725e49cd6655191544d1cf92b75a3..d1059c7c7bd230ac58239c89df05f0a4dd6ff1c9 100644 |
--- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp |
+++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp |
@@ -739,6 +739,9 @@ GrPorterDuffXPFactory::onCreateXferProcessor(const GrCaps& caps, |
const GrPipelineOptimizations& optimizations, |
bool hasMixedSamples, |
const DstTexture* dstTexture) const { |
+ if (optimizations.fOverrides.fUsePLSDstRead) { |
+ return new ShaderPDXferProcessor(dstTexture, hasMixedSamples, fXfermode); |
+ } |
BlendFormula blendFormula; |
if (optimizations.fCoveragePOI.isFourChannelOutput()) { |
if (SkXfermode::kSrcOver_Mode == fXfermode && |
@@ -795,9 +798,9 @@ void GrPorterDuffXPFactory::getInvariantBlendedColor(const GrProcOptInfo& colorP |
} |
} |
-bool GrPorterDuffXPFactory::willReadDstColor(const GrCaps& caps, |
- const GrPipelineOptimizations& optimizations, |
- bool hasMixedSamples) const { |
+bool GrPorterDuffXPFactory::onWillReadDstColor(const GrCaps& caps, |
+ const GrPipelineOptimizations& optimizations, |
+ bool hasMixedSamples) const { |
if (caps.shaderCaps()->dualSourceBlendingSupport()) { |
return false; |
} |
@@ -854,6 +857,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 && |