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

Unified Diff: src/gpu/GrXferProcessor.cpp

Issue 1480353002: APIs which took colorPOI / coveragePOI pairs updated to take a GrPipelineOptimizations struct (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/GrPipelineBuilder.cpp ('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 655fdfae7b0b69002ef444a3ed753cd26958b198..3bccd6e3f76a4f20c24c5040b43d49814c482a8f 100644
--- a/src/gpu/GrXferProcessor.cpp
+++ b/src/gpu/GrXferProcessor.cpp
@@ -6,6 +6,7 @@
*/
#include "GrXferProcessor.h"
+#include "GrPipeline.h"
#include "GrPipelineBuilder.h"
#include "GrProcOptInfo.h"
#include "gl/GrGLCaps.h"
@@ -33,13 +34,12 @@ GrXferProcessor::GrXferProcessor(const DstTexture* dstTexture,
}
}
-GrXferProcessor::OptFlags GrXferProcessor::getOptimizations(const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI,
- bool doesStencilWrite,
- GrColor* overrideColor,
- const GrCaps& caps) {
- GrXferProcessor::OptFlags flags = this->onGetOptimizations(colorPOI,
- coveragePOI,
+GrXferProcessor::OptFlags GrXferProcessor::getOptimizations(
+ const GrPipelineOptimizations& optimizations,
+ bool doesStencilWrite,
+ GrColor* overrideColor,
+ const GrCaps& caps) {
+ GrXferProcessor::OptFlags flags = this->onGetOptimizations(optimizations,
doesStencilWrite,
overrideColor,
caps);
@@ -47,7 +47,7 @@ GrXferProcessor::OptFlags GrXferProcessor::getOptimizations(const GrProcOptInfo&
if (this->willReadDstColor()) {
// When performing a dst read we handle coverage in the base class.
SkASSERT(!(flags & GrXferProcessor::kIgnoreCoverage_OptFlag));
- if (coveragePOI.isSolidWhite()) {
+ if (optimizations.fCoveragePOI.isSolidWhite()) {
flags |= GrXferProcessor::kIgnoreCoverage_OptFlag;
}
}
@@ -200,13 +200,12 @@ SkString GrXferProcessor::BlendInfo::dump() const {
///////////////////////////////////////////////////////////////////////////////
-GrXferProcessor* GrXPFactory::createXferProcessor(const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI,
+GrXferProcessor* GrXPFactory::createXferProcessor(const GrPipelineOptimizations& optimizations,
bool hasMixedSamples,
const DstTexture* dstTexture,
const GrCaps& caps) const {
#ifdef SK_DEBUG
- if (this->willReadDstColor(caps, colorPOI, coveragePOI, hasMixedSamples)) {
+ if (this->willReadDstColor(caps, optimizations, hasMixedSamples)) {
if (!caps.shaderCaps()->dstReadInShaderSupport()) {
SkASSERT(dstTexture && dstTexture->texture());
} else {
@@ -217,13 +216,12 @@ GrXferProcessor* GrXPFactory::createXferProcessor(const GrProcOptInfo& colorPOI,
}
SkASSERT(!hasMixedSamples || caps.shaderCaps()->dualSourceBlendingSupport());
#endif
- return this->onCreateXferProcessor(caps, colorPOI, coveragePOI, hasMixedSamples, dstTexture);
+ return this->onCreateXferProcessor(caps, optimizations, hasMixedSamples, dstTexture);
}
bool GrXPFactory::willNeedDstTexture(const GrCaps& caps,
- const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI,
+ const GrPipelineOptimizations& optimizations,
bool hasMixedSamples) const {
- return (this->willReadDstColor(caps, colorPOI, coveragePOI, hasMixedSamples) &&
+ return (this->willReadDstColor(caps, optimizations, hasMixedSamples) &&
!caps.shaderCaps()->dstReadInShaderSupport());
}
« no previous file with comments | « src/gpu/GrPipelineBuilder.cpp ('k') | src/gpu/effects/GrCoverageSetOpXP.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698