Index: src/gpu/GrDrawState.cpp |
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp |
index 14ba6fad5d148c02574ff8ca29f17a87684ba203..02c7920f5d07c778870ae7ef972b733316c61c73 100644 |
--- a/src/gpu/GrDrawState.cpp |
+++ b/src/gpu/GrDrawState.cpp |
@@ -409,6 +409,15 @@ GrDrawState::BlendOptFlags GrDrawState::calcBlendOpts(bool forceCoverage, |
return kNone_BlendOpt; |
} |
+bool GrDrawState::canIgnoreColorAttribute() const { |
+ if (fBlendOptFlags & kInvalid_BlendOptFlag) { |
+ this->getBlendOpts(); |
+ } |
+ return SkToBool(fBlendOptFlags & (GrDrawState::kEmitTransBlack_BlendOptFlag | |
+ GrDrawState::kEmitCoverage_BlendOptFlag)); |
+} |
+ |
+ |
//////////////////////////////////////////////////////////////////////////////// |
void GrDrawState::AutoViewMatrixRestore::restore() { |