Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1057)

Unified Diff: src/gpu/GrXferProcessor.cpp

Issue 1471293003: Create a static instances of SrcOver XferProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix Build Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrProgramDesc.h ('k') | src/gpu/effects/GrCoverageSetOpXP.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrXferProcessor.cpp
diff --git a/src/gpu/GrXferProcessor.cpp b/src/gpu/GrXferProcessor.cpp
index 3bccd6e3f76a4f20c24c5040b43d49814c482a8f..b07b9720df69e6677fad14b27286bab90fc419b3 100644
--- a/src/gpu/GrXferProcessor.cpp
+++ b/src/gpu/GrXferProcessor.cpp
@@ -14,7 +14,6 @@
GrXferProcessor::GrXferProcessor()
: fWillReadDstColor(false)
, fDstReadUsesMixedSamples(false)
- , fReadsCoverage(true)
, fDstTextureOffset() {
}
@@ -23,7 +22,6 @@ GrXferProcessor::GrXferProcessor(const DstTexture* dstTexture,
bool hasMixedSamples)
: fWillReadDstColor(willReadDstColor)
, fDstReadUsesMixedSamples(willReadDstColor && hasMixedSamples)
- , fReadsCoverage(true)
, fDstTextureOffset() {
if (dstTexture && dstTexture->texture()) {
SkASSERT(willReadDstColor);
@@ -38,7 +36,7 @@ GrXferProcessor::OptFlags GrXferProcessor::getOptimizations(
const GrPipelineOptimizations& optimizations,
bool doesStencilWrite,
GrColor* overrideColor,
- const GrCaps& caps) {
+ const GrCaps& caps) const {
GrXferProcessor::OptFlags flags = this->onGetOptimizations(optimizations,
doesStencilWrite,
overrideColor,
@@ -51,9 +49,6 @@ GrXferProcessor::OptFlags GrXferProcessor::getOptimizations(
flags |= GrXferProcessor::kIgnoreCoverage_OptFlag;
}
}
- if (flags & GrXferProcessor::kIgnoreCoverage_OptFlag) {
- fReadsCoverage = false;
- }
return flags;
}
@@ -82,11 +77,8 @@ void GrXferProcessor::getGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKey
key |= 0x4;
}
}
- if (this->readsCoverage()) {
- key |= 0x8;
- }
if (this->dstReadUsesMixedSamples()) {
- key |= 0x10;
+ key |= 0x8;
}
}
b->add32(key);
« no previous file with comments | « src/gpu/GrProgramDesc.h ('k') | src/gpu/effects/GrCoverageSetOpXP.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698