diff options
author | Brian Salomon <bsalomon@google.com> | 2016-12-21 09:20:25 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-21 15:12:49 +0000 |
commit | 92aee3d6857386f2b5b8e1148e680a7b58e9b1fc (patch) | |
tree | 8b54e16b9dbee4411c8e996504872672e1f61fa3 /src/gpu/GrXferProcessor.cpp | |
parent | bd81a327b5728b51cac8642128bd2f165d078ef7 (diff) |
This renames methods and classes that relate to static analysis of combinations of GrDrawOps and GrPipelines.
Change-Id: I737b901a19d3c67d2ff7f95802fb4df35656beb2
Reviewed-on: https://skia-review.googlesource.com/6199
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrXferProcessor.cpp')
-rw-r--r-- | src/gpu/GrXferProcessor.cpp | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/src/gpu/GrXferProcessor.cpp b/src/gpu/GrXferProcessor.cpp index ebf949285b..13533af380 100644 --- a/src/gpu/GrXferProcessor.cpp +++ b/src/gpu/GrXferProcessor.cpp @@ -31,20 +31,17 @@ GrXferProcessor::GrXferProcessor(const DstTexture* dstTexture, } } -GrXferProcessor::OptFlags GrXferProcessor::getOptimizations( - const GrPipelineOptimizations& optimizations, - bool doesStencilWrite, - GrColor* overrideColor, - const GrCaps& caps) const { - GrXferProcessor::OptFlags flags = this->onGetOptimizations(optimizations, - doesStencilWrite, - overrideColor, - caps); +GrXferProcessor::OptFlags GrXferProcessor::getOptimizations(const GrPipelineAnalysis& analysis, + bool doesStencilWrite, + GrColor* overrideColor, + const GrCaps& caps) const { + GrXferProcessor::OptFlags flags = + this->onGetOptimizations(analysis, doesStencilWrite, overrideColor, caps); if (this->willReadDstColor()) { // When performing a dst read we handle coverage in the base class. SkASSERT(!(flags & GrXferProcessor::kIgnoreCoverage_OptFlag)); - if (optimizations.fCoveragePOI.isSolidWhite()) { + if (analysis.fCoveragePOI.isSolidWhite()) { flags |= GrXferProcessor::kIgnoreCoverage_OptFlag; } } @@ -192,12 +189,12 @@ SkString GrXferProcessor::BlendInfo::dump() const { /////////////////////////////////////////////////////////////////////////////// -GrXferProcessor* GrXPFactory::createXferProcessor(const GrPipelineOptimizations& optimizations, +GrXferProcessor* GrXPFactory::createXferProcessor(const GrPipelineAnalysis& analysis, bool hasMixedSamples, const DstTexture* dstTexture, const GrCaps& caps) const { #ifdef SK_DEBUG - if (this->willReadDstColor(caps, optimizations)) { + if (this->willReadDstColor(caps, analysis)) { if (!caps.shaderCaps()->dstReadInShaderSupport()) { SkASSERT(dstTexture && dstTexture->texture()); } else { @@ -208,16 +205,13 @@ GrXferProcessor* GrXPFactory::createXferProcessor(const GrPipelineOptimizations& } SkASSERT(!hasMixedSamples || caps.shaderCaps()->dualSourceBlendingSupport()); #endif - return this->onCreateXferProcessor(caps, optimizations, hasMixedSamples, dstTexture); + return this->onCreateXferProcessor(caps, analysis, hasMixedSamples, dstTexture); } -bool GrXPFactory::willNeedDstTexture(const GrCaps& caps, - const GrPipelineOptimizations& optimizations) const { - return (this->willReadDstColor(caps, optimizations) && - !caps.shaderCaps()->dstReadInShaderSupport()); +bool GrXPFactory::willNeedDstTexture(const GrCaps& caps, const GrPipelineAnalysis& analysis) const { + return (this->willReadDstColor(caps, analysis) && !caps.shaderCaps()->dstReadInShaderSupport()); } -bool GrXPFactory::willReadDstColor(const GrCaps& caps, - const GrPipelineOptimizations& optimizations) const { - return optimizations.fOverrides.fUsePLSDstRead || this->onWillReadDstColor(caps, optimizations); +bool GrXPFactory::willReadDstColor(const GrCaps& caps, const GrPipelineAnalysis& analysis) const { + return analysis.fUsesPLSDstRead || this->onWillReadDstColor(caps, analysis); } |