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/GrDefaultGeoProcFactory.cpp b/src/gpu/GrDefaultGeoProcFactory.cpp
index 0ac6af7..5dfff7e 100644
--- a/src/gpu/GrDefaultGeoProcFactory.cpp
+++ b/src/gpu/GrDefaultGeoProcFactory.cpp
@@ -256,7 +256,7 @@
// The bone matrices are passed in as 3x2 matrices in column-major order as groups
// of 3 float2s. This code takes those float2s and performs the matrix operation on
// a given matrix and float2.
- static const GrShaderVar gApplyBoneArgs[] = {
+ const GrShaderVar gApplyBoneArgs[] = {
GrShaderVar("index", kByte_GrSLType),
GrShaderVar("vec", kFloat2_GrSLType),
};
diff --git a/src/gpu/effects/GrSRGBEffect.cpp b/src/gpu/effects/GrSRGBEffect.cpp
index f4dfd3c..68680d1 100644
--- a/src/gpu/effects/GrSRGBEffect.cpp
+++ b/src/gpu/effects/GrSRGBEffect.cpp
@@ -19,7 +19,7 @@
GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
SkString srgbFuncName;
- static const GrShaderVar gSrgbArgs[] = {
+ const GrShaderVar gSrgbArgs[] = {
GrShaderVar("x", kHalf_GrSLType),
};
switch (srgbe.mode()) {
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);");