Create helper functions to use in computeInvariantOutput calls

BUG=skia:

Review URL: https://codereview.chromium.org/643743003
diff --git a/src/gpu/effects/GrDitherEffect.cpp b/src/gpu/effects/GrDitherEffect.cpp
index ce8c471..96cdd75 100644
--- a/src/gpu/effects/GrDitherEffect.cpp
+++ b/src/gpu/effects/GrDitherEffect.cpp
@@ -50,8 +50,7 @@
 };
 
 void DitherEffect::onComputeInvariantOutput(InvariantOutput* inout) const {
-    inout->fValidFlags = 0;
-    inout->fIsSingleComponent = false;
+    inout->setToUnknown();
 }
 
 //////////////////////////////////////////////////////////////////////////////