Index: src/effects/gradients/SkGradientShader.cpp |
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp |
index d25873b438502c84bd3a880f84524ed6bff21df0..89b323a701d2c3cdc09a20114b1457e3375a3736 100644 |
--- a/src/effects/gradients/SkGradientShader.cpp |
+++ b/src/effects/gradients/SkGradientShader.cpp |
@@ -1217,12 +1217,13 @@ bool GrGradientEffect::onIsEqual(const GrProcessor& processor) const { |
return false; |
} |
-void GrGradientEffect::getConstantColorComponents(GrColor* color, uint32_t* validFlags) const { |
- if (fIsOpaque && (kA_GrColorComponentFlag & *validFlags) && 0xff == GrColorUnpackA(*color)) { |
- *validFlags = kA_GrColorComponentFlag; |
+void GrGradientEffect::onComputeInvariantOutput(InvariantOutput* inout) const { |
+ if (fIsOpaque && inout->isOpaque()) { |
+ inout->fValidFlags = kA_GrColorComponentFlag; |
} else { |
- *validFlags = 0; |
+ inout->fValidFlags = 0; |
} |
+ inout->fIsSingleComponent = false; |
} |
int GrGradientEffect::RandomGradientParams(SkRandom* random, |