Index: src/gpu/effects/GrSingleTextureEffect.h |
diff --git a/src/gpu/effects/GrSingleTextureEffect.h b/src/gpu/effects/GrSingleTextureEffect.h |
index cba322eab4e32256703e10d9b01a797e0fe5e1cf..6349ee7896af677ba06dcc679445719b7e42a805 100644 |
--- a/src/gpu/effects/GrSingleTextureEffect.h |
+++ b/src/gpu/effects/GrSingleTextureEffect.h |
@@ -44,15 +44,16 @@ |
} |
/** |
- * Can be used as a helper to implement subclass onComputeInvariantOutput(). It assumes that |
+ * Can be used as a helper to implement subclass getConstantColorComponents(). It assumes that |
* the subclass output color will be a modulation of the input color with a value read from the |
* texture. |
*/ |
- void updateInvariantOutputForModulation(InvariantOutput* inout) const { |
- if (inout->isOpaque() && GrPixelConfigIsOpaque(this->texture(0)->config())) { |
- inout->fValidFlags = kA_GrColorComponentFlag; |
+ void updateConstantColorComponentsForModulation(GrColor* color, uint32_t* validFlags) const { |
+ if ((*validFlags & kA_GrColorComponentFlag) && 0xFF == GrColorUnpackA(*color) && |
+ GrPixelConfigIsOpaque(this->texture(0)->config())) { |
+ *validFlags = kA_GrColorComponentFlag; |
} else { |
- inout->fValidFlags = 0; |
+ *validFlags = 0; |
} |
} |