diff --git a/src/gpu/glsl/GrGLSLFragmentProcessor.cpp b/src/gpu/glsl/GrGLSLFragmentProcessor.cpp index 78c427da85..b045b9755e 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 357b80efd3..12733ca062 100644 --- a/src/gpu/glsl/GrGLSLFragmentProcessor.h +++ b/src/gpu/glsl/GrGLSLFragmentProcessor.h @@ -124,6 +124,8 @@ public: 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(); } diff --git a/src/gpu/mtl/GrMtlPipelineState.mm b/src/gpu/mtl/GrMtlPipelineState.mm index b2bcf0827e..6b4ed262f2 100644 --- a/src/gpu/mtl/GrMtlPipelineState.mm +++ b/src/gpu/mtl/GrMtlPipelineState.mm @@ -81,7 +81,7 @@ void GrMtlPipelineState::setData(const GrPrimitiveProcessor& primProc, const GrFragmentProcessor* fp = iter.next(); GrGLSLFragmentProcessor* glslFP = glslIter.next(); while (fp && glslFP) { - glslFP->setData(fDataManager, *fp); + glslFP->setData(fDataManager, *fp); for (int i = 0; i < fp->numTextureSamplers(); ++i) { const auto& sampler = fp->textureSampler(i); fSamplerBindings.emplace_back(sampler.samplerState(), sampler.peekTexture(),