Remove unnecessary scope from fragment shaders.
This block no longer appears to provide any benefit; we mangle variable
names to prevent name collisions already.
Change-Id: I970a9d55ed5a77b93ff611e6a58e9424db78f6db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382396
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.cpp b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
index ccbb093..af3b407 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
@@ -89,10 +89,7 @@
fUniformHandles.fRTAdjustmentUni = this->uniformHandler()->addUniform(
nullptr, rtAdjustVisibility, kFloat4_GrSLType, SkSL::Compiler::RTADJUST_NAME);
- // Enclose custom code in a block to avoid namespace conflicts
- SkString openBrace;
- openBrace.printf("{ // Stage %d, %s\n", fStageIndex, proc.name());
- fFS.codeAppend(openBrace.c_str());
+ fFS.codeAppendf("// Stage %d, %s\n", fStageIndex, proc.name());
fVS.codeAppendf("// Primitive Processor %s\n", proc.name());
SkASSERT(!fGeometryProcessor);
@@ -127,8 +124,6 @@
// We have to check that effects and the code they emit are consistent, ie if an effect
// asks for dst color, then the emit code needs to follow suit
SkDEBUGCODE(verify(proc);)
-
- fFS.codeAppend("}");
}
void GrGLSLProgramBuilder::emitAndInstallFragProcs(SkString* color, SkString* coverage) {