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