Index: src/gpu/effects/GrCustomXfermode.cpp |
diff --git a/src/gpu/effects/GrCustomXfermode.cpp b/src/gpu/effects/GrCustomXfermode.cpp |
index 93f20738b41fcbaf1a5497344db3947078194fe2..04ff4a746ba733692ddab05ebb012f94ee341afb 100644 |
--- a/src/gpu/effects/GrCustomXfermode.cpp |
+++ b/src/gpu/effects/GrCustomXfermode.cpp |
@@ -54,15 +54,12 @@ static GrBlendEquation hw_blend_equation(SkXfermode::Mode mode) { |
} |
static bool can_use_hw_blend_equation(GrBlendEquation equation, |
- const GrPipelineOptimizations& opt, |
+ const GrProcOptInfo& coveragePOI, |
const GrCaps& caps) { |
if (!caps.advancedBlendEquationSupport()) { |
return false; |
} |
- if (opt.fOverrides.fUsePLSDstRead) { |
- return false; |
- } |
- if (opt.fCoveragePOI.isFourChannelOutput()) { |
+ if (coveragePOI.isFourChannelOutput()) { |
return false; // LCD coverage must be applied after the blend equation. |
} |
if (caps.canUseAdvancedBlendEquation(equation)) { |
@@ -346,7 +343,7 @@ private: |
bool hasMixedSamples, |
const DstTexture*) const override; |
- bool onWillReadDstColor(const GrCaps& caps, |
+ bool willReadDstColor(const GrCaps& caps, |
const GrPipelineOptimizations& optimizations, |
bool hasMixedSamples) const override; |
@@ -374,17 +371,17 @@ GrXferProcessor* CustomXPFactory::onCreateXferProcessor(const GrCaps& caps, |
const GrPipelineOptimizations& opt, |
bool hasMixedSamples, |
const DstTexture* dstTexture) const { |
- if (can_use_hw_blend_equation(fHWBlendEquation, opt, caps)) { |
+ if (can_use_hw_blend_equation(fHWBlendEquation, opt.fCoveragePOI, caps)) { |
SkASSERT(!dstTexture || !dstTexture->texture()); |
return new CustomXP(fMode, fHWBlendEquation); |
} |
return new CustomXP(dstTexture, hasMixedSamples, fMode); |
} |
-bool CustomXPFactory::onWillReadDstColor(const GrCaps& caps, |
- const GrPipelineOptimizations& optimizations, |
- bool hasMixedSamples) const { |
- return !can_use_hw_blend_equation(fHWBlendEquation, optimizations, caps); |
+bool CustomXPFactory::willReadDstColor(const GrCaps& caps, |
+ const GrPipelineOptimizations& optimizations, |
+ bool hasMixedSamples) const { |
+ return !can_use_hw_blend_equation(fHWBlendEquation, optimizations.fCoveragePOI, caps); |
} |
void CustomXPFactory::getInvariantBlendedColor(const GrProcOptInfo& colorPOI, |