Index: src/gpu/GrOptDrawState.cpp |
diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp |
index 6a79203d1a0bcaded4bb6b0fd83387341f391e80..98a5689d534b72425a5df85f6409b64fd0f11dc6 100644 |
--- a/src/gpu/GrOptDrawState.cpp |
+++ b/src/gpu/GrOptDrawState.cpp |
@@ -170,19 +170,18 @@ |
int firstColorStage = 0; |
// Set up color and flags for ConstantColorComponent checks |
- GrProcessor::InvariantOutput inout; |
- inout.fIsSingleComponent = false; |
+ GrColor color; |
+ uint32_t validComponentFlags; |
if (!this->hasColorVertexAttribute()) { |
- inout.fColor = ds.getColor(); |
- inout.fValidFlags = kRGBA_GrColorComponentFlags; |
+ color = ds.getColor(); |
+ validComponentFlags = kRGBA_GrColorComponentFlags; |
} else { |
if (ds.vertexColorsAreOpaque()) { |
- inout.fColor = 0xFF << GrColor_SHIFT_A; |
- inout.fValidFlags = kA_GrColorComponentFlag; |
+ color = 0xFF << GrColor_SHIFT_A; |
+ validComponentFlags = kA_GrColorComponentFlag; |
} else { |
- inout.fValidFlags = 0; |
- // not strictly necessary but we get false alarms from tools about uninit. |
- inout.fColor = 0; |
+ validComponentFlags = 0; |
+ color = 0; // not strictly necessary but we get false alarms from tools about uninit. |
} |
} |
@@ -192,10 +191,10 @@ |
firstColorStage = i; |
fInputColorIsUsed = false; |
} |
- fp->computeInvariantOutput(&inout); |
- if (kRGBA_GrColorComponentFlags == inout.fValidFlags) { |
+ fp->getConstantColorComponents(&color, &validComponentFlags); |
+ if (kRGBA_GrColorComponentFlags == validComponentFlags) { |
firstColorStage = i + 1; |
- fColor = inout.fColor; |
+ fColor = color; |
fInputColorIsUsed = true; |
this->removeFixedFunctionVertexAttribs(0x1 << kColor_GrVertexAttribBinding); |
} |