Remove recursion from setData() in GrGLSLFragmentProcessor
Bug: skia:8417
Change-Id: Ida8517b959e7d521ae3ebd002ae84e4c55008ad2
Reviewed-on: https://skia-review.googlesource.com/157423
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
diff --git a/src/gpu/glsl/GrGLSLFragmentProcessor.cpp b/src/gpu/glsl/GrGLSLFragmentProcessor.cpp
index 78c427d..b045b97 100644
--- a/src/gpu/glsl/GrGLSLFragmentProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLFragmentProcessor.cpp
@@ -14,10 +14,6 @@
void GrGLSLFragmentProcessor::setData(const GrGLSLProgramDataManager& pdman,
const GrFragmentProcessor& processor) {
this->onSetData(pdman, processor);
- SkASSERT(fChildProcessors.count() == processor.numChildProcessors());
- for (int i = 0; i < fChildProcessors.count(); ++i) {
- fChildProcessors[i]->setData(pdman, processor.childProcessor(i));
- }
}
void GrGLSLFragmentProcessor::emitChild(int childIndex, const char* inputColor, EmitArgs& args) {
diff --git a/src/gpu/glsl/GrGLSLFragmentProcessor.h b/src/gpu/glsl/GrGLSLFragmentProcessor.h
index 357b80e..12733ca 100644
--- a/src/gpu/glsl/GrGLSLFragmentProcessor.h
+++ b/src/gpu/glsl/GrGLSLFragmentProcessor.h
@@ -124,6 +124,8 @@
virtual void emitCode(EmitArgs&) = 0;
+ // This does not recurse to any attached child processors. Recursing the entire processor tree
+ // is the responsibility of the caller.
void setData(const GrGLSLProgramDataManager& pdman, const GrFragmentProcessor& processor);
int numChildProcessors() const { return fChildProcessors.count(); }