diff options
author | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-02-21 18:53:39 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-02-21 18:53:39 +0000 |
commit | b9682d38c1daa597c4acffd93cbd5ba72735a613 (patch) | |
tree | 2da0fbc8c6c19c3a7d7453c40b796d63f45436f0 /src/gpu/gl | |
parent | c17972e7acc784553445adc18f608a8c4b1beac8 (diff) |
Change append to appendf for call sites with no format arguments.
Original CL: http://codereview.appspot.com/5685062/
Review URL: https://codereview.appspot.com/5686059
git-svn-id: http://skia.googlecode.com/svn/trunk@3225 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/gl')
-rw-r--r-- | src/gpu/gl/GrGLProgram.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp index e190c917bf..868149f4ae 100644 --- a/src/gpu/gl/GrGLProgram.cpp +++ b/src/gpu/gl/GrGLProgram.cpp @@ -489,7 +489,7 @@ void GrGLProgram::genEdgeCoverage(const GrGLContextInfo& gl, segments->fFSCode.appendf("\tfloat edgeAlpha = abs(dot(vec3(gl_FragCoord.xy,1), %s.xyz));\n", fsName); segments->fFSCode.append("\tedgeAlpha = max(1.0 - edgeAlpha, 0.0);\n"); } else if (GrDrawState::kQuad_EdgeType == fProgramDesc.fVertexEdgeType) { - segments->fFSCode.appendf("\tfloat edgeAlpha;\n"); + segments->fFSCode.append("\tfloat edgeAlpha;\n"); // keep the derivative instructions outside the conditional segments->fFSCode.appendf("\tvec2 duvdx = dFdx(%s.xy);\n", fsName); segments->fFSCode.appendf("\tvec2 duvdy = dFdy(%s.xy);\n", fsName); @@ -501,7 +501,7 @@ void GrGLProgram::genEdgeCoverage(const GrGLContextInfo& gl, "\t\t 2.0*%s.x*duvdy.x - duvdy.y);\n", fsName, fsName); segments->fFSCode.appendf("\t\tedgeAlpha = (%s.x*%s.x - %s.y);\n", fsName, fsName, fsName); - segments->fFSCode.appendf("\t\tedgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);\n" + segments->fFSCode.append("\t\tedgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);\n" "\t}\n"); if (kES2_GrGLBinding == gl.binding()) { segments->fHeader.printf("#extension GL_OES_standard_derivatives: enable\n"); @@ -816,7 +816,7 @@ bool GrGLProgram::genProgram(const GrGLContextInfo& gl, all_zeros_vec(4)); wroteFragColorZero = true; } else if (SkXfermode::kDst_Mode != fProgramDesc.fColorFilterXfermode) { - segments.fFSCode.appendf("\tvec4 filteredColor;\n"); + segments.fFSCode.append("\tvec4 filteredColor;\n"); const char* color = adjustInColor(inColor); addColorFilter(&segments.fFSCode, "filteredColor", uniformCoeff, colorCoeff, color); @@ -831,7 +831,7 @@ bool GrGLProgram::genProgram(const GrGLContextInfo& gl, COL_MATRIX_VEC_UNI_NAME); programData->fUniLocations.fColorMatrixUni = kUseUniform; programData->fUniLocations.fColorMatrixVecUni = kUseUniform; - segments.fFSCode.appendf("\tvec4 matrixedColor;\n"); + segments.fFSCode.append("\tvec4 matrixedColor;\n"); const char* color = adjustInColor(inColor); addColorMatrix(&segments.fFSCode, "matrixedColor", color); inColor = "matrixedColor"; @@ -1642,7 +1642,7 @@ void genConvolutionFS(int stageNum, segments->fFSCode.appendf("\t\t%s += %s;\n", coordVar.c_str(), imageIncrementName); - segments->fFSCode.appendf("\t}\n"); + segments->fFSCode.append("\t}\n"); segments->fFSCode.appendf("\t%s = %s%s;\n", fsOutColor, sumVar.c_str(), modulate.c_str()); } |