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

Unified Diff: src/gpu/GrRODrawState.cpp

Issue 504203004: Attach GrOptDrawState into shader building pipeline (Closed) Base URL: https://skia.googlesource.com/skia.git@opt2
Patch Set: Rebase Created 6 years, 3 months 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/GrRODrawState.h ('k') | src/gpu/gl/GrGLProgram.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrRODrawState.cpp
diff --git a/src/gpu/GrRODrawState.cpp b/src/gpu/GrRODrawState.cpp
index f7e486f925983522c936d5dc6f96bdf3245dd69f..26edb18c068837f4b29093c5bea465d11fdb598d 100644
--- a/src/gpu/GrRODrawState.cpp
+++ b/src/gpu/GrRODrawState.cpp
@@ -184,26 +184,6 @@ GrRODrawState::BlendOptFlags GrRODrawState::getBlendOpts(bool forceCoverage,
dstCoeff = &bogusDstCoeff;
}
- if (forceCoverage) {
- return this->calcBlendOpts(true, srcCoeff, dstCoeff);
- }
-
- if (0 == (fBlendOptFlags & kInvalid_BlendOptFlag)) {
- *srcCoeff = fOptSrcBlend;
- *dstCoeff = fOptDstBlend;
- return fBlendOptFlags;
- }
-
- fBlendOptFlags = this->calcBlendOpts(forceCoverage, srcCoeff, dstCoeff);
- fOptSrcBlend = *srcCoeff;
- fOptDstBlend = *dstCoeff;
-
- return fBlendOptFlags;
-}
-
-GrRODrawState::BlendOptFlags GrRODrawState::calcBlendOpts(bool forceCoverage,
- GrBlendCoeff* srcCoeff,
- GrBlendCoeff* dstCoeff) const {
*srcCoeff = this->getSrcBlendCoeff();
*dstCoeff = this->getDstBlendCoeff();
@@ -225,6 +205,7 @@ GrRODrawState::BlendOptFlags GrRODrawState::calcBlendOpts(bool forceCoverage,
if (this->getStencil().doesWrite()) {
return kEmitCoverage_BlendOptFlag;
} else {
+ *dstCoeff = kOne_GrBlendCoeff;
return kSkipDraw_BlendOptFlag;
}
}
@@ -372,13 +353,3 @@ bool GrRODrawState::srcAlphaWillBeOne() const {
return (kA_GrColorComponentFlag & validComponentFlags) && 0xFF == GrColorUnpackA(color);
}
-////////////////////////////////////////////////////////////////////////////////
-
-bool GrRODrawState::canIgnoreColorAttribute() const {
- if (fBlendOptFlags & kInvalid_BlendOptFlag) {
- this->getBlendOpts();
- }
- return SkToBool(fBlendOptFlags & (GrRODrawState::kEmitTransBlack_BlendOptFlag |
- GrRODrawState::kEmitCoverage_BlendOptFlag));
-}
-
« no previous file with comments | « src/gpu/GrRODrawState.h ('k') | src/gpu/gl/GrGLProgram.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698