Add isSingleComponent bool to getConstantColorComponent
Initial step to allowing effects to use/output 1 or 4 color/coverage components. This cl doesn't change any current logic and all effects still assume they are working with 4 components.
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/3b8af078281a5a20f951b9fd84f38d92b8f6217b
Review URL: https://codereview.chromium.org/608253002
diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp
index 6743ddb..a7707da 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.cpp
+++ b/src/gpu/effects/GrSimpleTextureEffect.cpp
@@ -41,8 +41,9 @@
///////////////////////////////////////////////////////////////////////////////
-void GrSimpleTextureEffect::getConstantColorComponents(GrColor* color, uint32_t* validFlags) const {
- this->updateConstantColorComponentsForModulation(color, validFlags);
+void GrSimpleTextureEffect::onComputeInvariantOutput(InvariantOutput* inout) const {
+ this->updateInvariantOutputForModulation(inout);
+ inout->fIsSingleComponent = false;
}
const GrBackendFragmentProcessorFactory& GrSimpleTextureEffect::getFactory() const {