Index: src/gpu/GrXferProcessor.cpp |
diff --git a/src/gpu/GrXferProcessor.cpp b/src/gpu/GrXferProcessor.cpp |
index 243b9feb3f32edd6cee2386aaf10d91fb135f89b..bc79b2dbe1a3ea71c895a33a2886d6b91b57c899 100644 |
--- a/src/gpu/GrXferProcessor.cpp |
+++ b/src/gpu/GrXferProcessor.cpp |
@@ -8,11 +8,13 @@ |
#include "GrXferProcessor.h" |
#include "gl/GrGLCaps.h" |
-GrXferProcessor::GrXferProcessor() : fWillReadDstColor(false), fDstCopyTextureOffset() { |
+GrXferProcessor::GrXferProcessor() |
+ : fWillReadDstColor(false), fReadsCoverage(true), fDstCopyTextureOffset() { |
} |
GrXferProcessor::GrXferProcessor(const GrDeviceCoordTexture* dstCopy, bool willReadDstColor) |
: fWillReadDstColor(willReadDstColor) |
+ , fReadsCoverage(true) |
, fDstCopyTextureOffset() { |
if (dstCopy && dstCopy->texture()) { |
fDstCopy.reset(dstCopy->texture()); |
@@ -22,6 +24,23 @@ GrXferProcessor::GrXferProcessor(const GrDeviceCoordTexture* dstCopy, bool willR |
} |
} |
+GrXferProcessor::OptFlags GrXferProcessor::getOptimizations(const GrProcOptInfo& colorPOI, |
+ const GrProcOptInfo& coveragePOI, |
+ bool doesStencilWrite, |
+ GrColor* overrideColor, |
+ const GrDrawTargetCaps& caps) { |
+ GrXferProcessor::OptFlags flags = this->onGetOptimizations(colorPOI, |
+ coveragePOI, |
+ doesStencilWrite, |
+ overrideColor, |
+ caps); |
+ |
+ if (flags & GrXferProcessor::kIgnoreCoverage_OptFlag) { |
+ fReadsCoverage = false; |
+ } |
+ return flags; |
+} |
+ |
void GrXferProcessor::getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const { |
uint32_t key = this->willReadDstColor() ? 0x1 : 0x0; |
if (this->getDstCopyTexture() && |