Chromium Code Reviews| Index: include/gpu/GrFragmentProcessor.h |
| diff --git a/include/gpu/GrFragmentProcessor.h b/include/gpu/GrFragmentProcessor.h |
| index 8fc3ec1d4b3fe9aed42f228a37065dfa8c99ccdd..942642f163dfa02fed15e31853f9b613dbe10e2d 100644 |
| --- a/include/gpu/GrFragmentProcessor.h |
| +++ b/include/gpu/GrFragmentProcessor.h |
| @@ -85,12 +85,18 @@ 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*/ |
|
bsalomon
2015/08/05 17:22:11
update comment?
"Coord transforms may be applied
joshualitt
2015/08/05 17:46:21
Acknowledged.
|
| - bool isEqual(const GrFragmentProcessor& that) const { |
| + bool isEqual(const GrFragmentProcessor& that, bool ignoreCoordTransforms) const { |
| if (this->classID() != that.classID() || |
| - !this->hasSameTransforms(that) || |
| !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); |
| } |