Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp

Issue 553583008: Add counting of some GL calls (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update for merge conflict Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/gl/GrGpuGL.cpp ('k') | src/gpu/gl/builders/GrGLGeometryShaderBuilder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrGLFragmentShaderBuilder.h" 8 #include "GrGLFragmentShaderBuilder.h"
9 #include "GrGLShaderStringBuilder.h" 9 #include "GrGLShaderStringBuilder.h"
10 #include "GrGLProgramBuilder.h" 10 #include "GrGLProgramBuilder.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 fProgramBuilder->appendUniformDecls(GrGLProgramBuilder::kFragment_Visibility , &fragShaderSrc); 224 fProgramBuilder->appendUniformDecls(GrGLProgramBuilder::kFragment_Visibility , &fragShaderSrc);
225 fProgramBuilder->appendDecls(fInputs, &fragShaderSrc); 225 fProgramBuilder->appendDecls(fInputs, &fragShaderSrc);
226 // We shouldn't have declared outputs on 1.10 226 // We shouldn't have declared outputs on 1.10
227 SkASSERT(k110_GrGLSLGeneration != gpu->glslGeneration() || fOutputs.empty()) ; 227 SkASSERT(k110_GrGLSLGeneration != gpu->glslGeneration() || fOutputs.empty()) ;
228 fProgramBuilder->appendDecls(fOutputs, &fragShaderSrc); 228 fProgramBuilder->appendDecls(fOutputs, &fragShaderSrc);
229 fragShaderSrc.append(fFunctions); 229 fragShaderSrc.append(fFunctions);
230 fragShaderSrc.append("void main() {\n"); 230 fragShaderSrc.append("void main() {\n");
231 fragShaderSrc.append(fCode); 231 fragShaderSrc.append(fCode);
232 fragShaderSrc.append("}\n"); 232 fragShaderSrc.append("}\n");
233 233
234 GrGLuint fragShaderId = GrGLCompileAndAttachShader(gpu->glContext(), 234 GrGLuint fragShaderId = GrGLCompileAndAttachShader(gpu->glContext(), program Id,
235 programId, GR_GL_FRAGMENT_SHADER, fragShaderSrc); 235 GR_GL_FRAGMENT_SHADER, fr agShaderSrc,
236 gpu->gpuStats());
236 if (!fragShaderId) { 237 if (!fragShaderId) {
237 return false; 238 return false;
238 } 239 }
239 240
240 *shaderIds->append() = fragShaderId; 241 *shaderIds->append() = fragShaderId;
241 242
242 return true; 243 return true;
243 } 244 }
244 245
245 void GrGLFragmentShaderBuilder::emitCodeBeforeEffects() { 246 void GrGLFragmentShaderBuilder::emitCodeBeforeEffects() {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 dual_source_output_name()); 344 dual_source_output_name());
344 fHasSecondaryOutput = true; 345 fHasSecondaryOutput = true;
345 } 346 }
346 return dual_source_output_name(); 347 return dual_source_output_name();
347 } 348 }
348 349
349 const char* GrGLFragmentShaderBuilder::getColorOutputName() const { 350 const char* GrGLFragmentShaderBuilder::getColorOutputName() const {
350 return fHasCustomColorOutput ? declared_color_output_name() : "gl_FragColor" ; 351 return fHasCustomColorOutput ? declared_color_output_name() : "gl_FragColor" ;
351 } 352 }
352 353
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGpuGL.cpp ('k') | src/gpu/gl/builders/GrGLGeometryShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698