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

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: Remove BlendOpt Cache 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
Index: src/gpu/GrRODrawState.cpp
diff --git a/src/gpu/GrRODrawState.cpp b/src/gpu/GrRODrawState.cpp
index b79e8fce4340df6253c676610b6682a05dea7037..48c0674f5d8baf79d2a32eb6ebb37a440e3e0a1f 100644
--- a/src/gpu/GrRODrawState.cpp
+++ b/src/gpu/GrRODrawState.cpp
@@ -186,17 +186,7 @@ GrRODrawState::BlendOptFlags GrRODrawState::getBlendOpts(bool 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;
+ return this->calcBlendOpts(forceCoverage, srcCoeff, dstCoeff);
}
GrRODrawState::BlendOptFlags GrRODrawState::calcBlendOpts(bool forceCoverage,
@@ -370,13 +360,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));
-}
-

Powered by Google App Engine
This is Rietveld 408576698