Add GrGLSLFP::ParallelRange to iterate FP and GLSLFP trees
Bug: skia:10139
Change-Id: I379249758160ad096c9e03f25a41b00bc1987518
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301384
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.cpp b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
index 627f380..1ec0e62 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
@@ -144,9 +144,9 @@
}
**inOut = output;
}
- fFragmentProcessorCnt = glslFragmentProcessors.count();
- fFragmentProcessors.reset(new std::unique_ptr<GrGLSLFragmentProcessor>[fFragmentProcessorCnt]);
- for (int i = 0; i < fFragmentProcessorCnt; ++i) {
+ int fpCount = glslFragmentProcessors.count();
+ fFragmentProcessors.reset(new std::unique_ptr<GrGLSLFragmentProcessor>[fpCount]);
+ for (int i = 0; i < fpCount; ++i) {
fFragmentProcessors[i] = std::move(glslFragmentProcessors[i]);
}
}