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

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: removed comment on computeInvariantOutput 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') | no next file with comments »
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..1b8a8183bdf1809dc8dd994d46b9c5fd3eadde03 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
@@ -131,6 +118,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;
« no previous file with comments | « no previous file | src/gpu/GrProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698