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

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: nit 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
Index: src/gpu/GrXferProcessor.cpp
diff --git a/src/gpu/GrXferProcessor.cpp b/src/gpu/GrXferProcessor.cpp
index 655fdfae7b0b69002ef444a3ed753cd26958b198..e8a3490c408a3e07920fa953a0f0fa706c8c84a6 100644
--- a/src/gpu/GrXferProcessor.cpp
+++ b/src/gpu/GrXferProcessor.cpp
@@ -13,7 +13,6 @@
GrXferProcessor::GrXferProcessor()
: fWillReadDstColor(false)
, fDstReadUsesMixedSamples(false)
- , fReadsCoverage(true)
, fDstTextureOffset() {
}
@@ -22,7 +21,6 @@ GrXferProcessor::GrXferProcessor(const DstTexture* dstTexture,
bool hasMixedSamples)
: fWillReadDstColor(willReadDstColor)
, fDstReadUsesMixedSamples(willReadDstColor && hasMixedSamples)
- , fReadsCoverage(true)
, fDstTextureOffset() {
if (dstTexture && dstTexture->texture()) {
SkASSERT(willReadDstColor);
@@ -37,7 +35,7 @@ GrXferProcessor::OptFlags GrXferProcessor::getOptimizations(const GrProcOptInfo&
const GrProcOptInfo& coveragePOI,
bool doesStencilWrite,
GrColor* overrideColor,
- const GrCaps& caps) {
+ const GrCaps& caps) const {
GrXferProcessor::OptFlags flags = this->onGetOptimizations(colorPOI,
coveragePOI,
doesStencilWrite,
@@ -51,9 +49,6 @@ GrXferProcessor::OptFlags GrXferProcessor::getOptimizations(const GrProcOptInfo&
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);

Powered by Google App Engine
This is Rietveld 408576698