Remove a few exit-time destructors.
Bug: chromium:101600
Change-Id: I47da22b27703f4d47622f6f25bc1694a1bcc3099
Reviewed-on: https://skia-review.googlesource.com/158440
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.cpp b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
index 73ac6e9..fd9669a 100644
--- a/src/gpu/glsl/GrGLSLShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
@@ -114,7 +114,7 @@
// Any combination of these may be present, although some configurations are much more likely.
auto emitTFFunc = [=](const char* name, GrGLSLProgramDataManager::UniformHandle uniform) {
- static const GrShaderVar gTFArgs[] = { GrShaderVar("x", kHalf_GrSLType) };
+ const GrShaderVar gTFArgs[] = { GrShaderVar("x", kHalf_GrSLType) };
const char* coeffs = uniformHandler->getUniformCStr(uniform);
SkString body;
// Temporaries to make evaluation line readable
@@ -146,7 +146,7 @@
SkString gamutXformFuncName;
if (colorXformHelper->applyGamutXform()) {
- static const GrShaderVar gGamutXformArgs[] = { GrShaderVar("color", kHalf4_GrSLType) };
+ const GrShaderVar gGamutXformArgs[] = { GrShaderVar("color", kHalf4_GrSLType) };
const char* xform = uniformHandler->getUniformCStr(colorXformHelper->gamutXformUniform());
SkString body;
body.appendf("color.rgb = (%s * color.rgb);", xform);
@@ -157,7 +157,7 @@
// Now define a wrapper function that applies all the intermediate steps
{
- static const GrShaderVar gColorXformArgs[] = { GrShaderVar("color", kHalf4_GrSLType) };
+ const GrShaderVar gColorXformArgs[] = { GrShaderVar("color", kHalf4_GrSLType) };
SkString body;
if (colorXformHelper->applyUnpremul()) {
body.append("half nonZeroAlpha = max(color.a, 0.00001);");