Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Unified Diff: include/gpu/GrFragmentProcessor.h

Issue 1287343005: Made isEqual in GrFragmentProcessor recursive (Closed) Base URL: https://skia.googlesource.com/skia@cs3_autoAdvance
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/GrProcessor.cpp » ('j') | src/gpu/GrProcessor.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | src/gpu/GrProcessor.cpp » ('j') | src/gpu/GrProcessor.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698