Index: include/gpu/GrFragmentProcessor.h |
diff --git a/include/gpu/GrFragmentProcessor.h b/include/gpu/GrFragmentProcessor.h |
index 4b2f96d7f9168e301b8255019961a2949030f870..3b8a1032ac68f7b01f5c6119ed8d94359ed35aa9 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 |
+ * what invariants its output can have given its children. |
tomhudson
2015/08/17 17:33:10
Please clarify: It's hard for me to understand how
joshualitt
2015/08/17 17:38:41
I think the confusion here is that the parent can
bsalomon
2015/08/17 18:04:16
Perhaps the comment should be on the virtual and n
wangyix
2015/08/17 19:07:46
Done.
|
*/ |
void computeInvariantOutput(GrInvariantOutput* inout) const; |