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

Unified Diff: src/gpu/GrDrawState.cpp

Issue 808813002: Add Coverage Drawing XP (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more nits Created 6 years 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/GrDrawState.h ('k') | src/gpu/GrOptDrawState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawState.cpp
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp
index ebabb43ad2113caf44a41ab57125d34eaad3de0a..711fdcb23a8902c4d88c3d0e4dcea94b58870bf1 100644
--- a/src/gpu/GrDrawState.cpp
+++ b/src/gpu/GrDrawState.cpp
@@ -185,21 +185,7 @@ bool GrDrawState::canUseFracCoveragePrimProc(GrColor color, const GrDrawTargetCa
// so we don't have to pass in a seemingly known coverage
this->calcCoverageInvariantOutput(GrColor_WHITE);
return fXPFactory->canApplyCoverage(fColorProcInfo, fCoverageProcInfo,
- this->isCoverageDrawing(), this->isColorWriteDisabled());
-}
-
-bool GrDrawState::hasSolidCoverage(const GrPrimitiveProcessor* pp) const {
- // If we're drawing coverage directly then coverage is effectively treated as color.
- if (this->isCoverageDrawing()) {
- return true;
- }
-
- if (this->numCoverageStages() > 0) {
- return false;
- }
-
- this->calcCoverageInvariantOutput(pp);
- return fCoverageProcInfo.isSolidWhite();
+ this->isColorWriteDisabled());
}
//////////////////////////////////////////////////////////////////////////////s
@@ -252,7 +238,7 @@ void GrDrawState::AutoRestoreEffects::set(GrDrawState* ds) {
// Some blend modes allow folding a fractional coverage value into the color's alpha channel, while
// others will blend incorrectly.
bool GrDrawState::canTweakAlphaForCoverage() const {
- return fXPFactory->canTweakAlphaForCoverage(this->isCoverageDrawing());
+ return fXPFactory->canTweakAlphaForCoverage();
}
////////////////////////////////////////////////////////////////////////////////
@@ -354,7 +340,7 @@ bool GrDrawState::willBlendWithDst(const GrPrimitiveProcessor* pp) const {
this->calcColorInvariantOutput(pp);
this->calcCoverageInvariantOutput(pp);
return fXPFactory->willBlendWithDst(fColorProcInfo, fCoverageProcInfo,
- this->isCoverageDrawing(), this->isColorWriteDisabled());
+ this->isColorWriteDisabled());
}
void GrDrawState::calcColorInvariantOutput(const GrPrimitiveProcessor* pp) const {
« no previous file with comments | « src/gpu/GrDrawState.h ('k') | src/gpu/GrOptDrawState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698