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

Unified Diff: src/gpu/GrOptDrawState.cpp

Issue 628633003: gl programs rewrite (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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/GrOptDrawState.cpp
diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp
index 6a79203d1a0bcaded4bb6b0fd83387341f391e80..e97070e4c30af82f52b1135fbd541d019888839f 100644
--- a/src/gpu/GrOptDrawState.cpp
+++ b/src/gpu/GrOptDrawState.cpp
@@ -167,6 +167,14 @@ void GrOptDrawState::removeFixedFunctionVertexAttribs(uint8_t removeVAFlag) {
}
void GrOptDrawState::copyEffectiveColorStages(const GrDrawState& ds) {
+ // If color write is disabled, then we don't want to copy any color stages and we should remove
+ // the fixed function color vertex attribute as well
+ if (this->isColorWriteDisabled()) {
bsalomon 2014/10/06 14:29:04 Greg is this the right place for this? Anywhere el
egdaniel 2014/10/07 13:46:13 It is already checked in the normal flow of creati
+ fColorStages.reset();
+ this->removeFixedFunctionVertexAttribs(0x1 << kColor_GrVertexAttribBinding);
+ return;
+ }
+
int firstColorStage = 0;
// Set up color and flags for ConstantColorComponent checks

Powered by Google App Engine
This is Rietveld 408576698