Index: include/gpu/GrFragmentProcessor.h |
diff --git a/include/gpu/GrFragmentProcessor.h b/include/gpu/GrFragmentProcessor.h |
index 4b2f96d7f9168e301b8255019961a2949030f870..3a720ad8c23c9e886453cb517bea795142dcf082 100644 |
--- a/include/gpu/GrFragmentProcessor.h |
+++ b/include/gpu/GrFragmentProcessor.h |
@@ -74,20 +74,7 @@ public: |
A return value of true from isEqual() should not be used to test whether the processor would |
generate the same shader code. To test for identical code generation use getGLProcessorKey*/ |
- bool isEqual(const GrFragmentProcessor& that, bool ignoreCoordTransforms) const { |
- if (this->classID() != that.classID() || |
- !this->hasSameTextureAccesses(that)) { |
- return false; |
- } |
- if (ignoreCoordTransforms) { |
- if (this->numTransforms() != that.numTransforms()) { |
- return false; |
- } |
- } else if (!this->hasSameTransforms(that)) { |
- return false; |
- } |
- return this->onIsEqual(that); |
- } |
+ bool isEqual(const GrFragmentProcessor& that, bool ignoreCoordTransforms) const; |
/** |
* This function is used to perform optimizations. When called the invarientOuput param |
@@ -96,6 +83,9 @@ public: |
* member indicates whether the input will be 1 or 4 bytes. The function updates the members of |
* inout to indicate known values of its output. A component of the color member only has |
* meaning if the corresponding bit in validFlags is set. |
+ * |
+ * Note: this function will NOT be recursive; it will be up to the parent proc to figure out |
bsalomon
2015/08/18 14:15:43
Let's remove the comment here and just leave the o
wangyix
2015/08/18 14:20:59
Done.
|
+ * what invariants its output can have given its children. |
*/ |
void computeInvariantOutput(GrInvariantOutput* inout) const; |
@@ -131,6 +121,9 @@ protected: |
/** |
* Subclass implements this to support getConstantColorComponents(...). |
+ * |
+ * Note: it's up to the subclass implementation to do any recursive call to compute the child |
+ * procs' output invariants; computeInvariantOutput will not be recursive. |
*/ |
virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const = 0; |