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

Side by Side Diff: src/gpu/gl/builders/GrGLGeometryShaderBuilder.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
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 "GrGLGeometryShaderBuilder.h" 8 #include "GrGLGeometryShaderBuilder.h"
9 #include "GrGLShaderStringBuilder.h" 9 #include "GrGLShaderStringBuilder.h"
10 #include "GrGLProgramBuilder.h" 10 #include "GrGLProgramBuilder.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 for (int i = 0; i < fInputs.count(); ++i) { 54 for (int i = 0; i < fInputs.count(); ++i) {
55 geomShaderSrc.appendf("\t\t%s = %s[i];\n", 55 geomShaderSrc.appendf("\t\t%s = %s[i];\n",
56 fOutputs[i].getName().c_str(), 56 fOutputs[i].getName().c_str(),
57 fInputs[i].getName().c_str()); 57 fInputs[i].getName().c_str());
58 } 58 }
59 geomShaderSrc.append("\t\tEmitVertex();\n" 59 geomShaderSrc.append("\t\tEmitVertex();\n"
60 "\t}\n" 60 "\t}\n"
61 "\tEndPrimitive();\n"); 61 "\tEndPrimitive();\n");
62 geomShaderSrc.append("}\n"); 62 geomShaderSrc.append("}\n");
63 GrGLuint geomShaderId = 63 GrGLuint geomShaderId =
64 GrGLCompileAndAttachShader(glCtx, programId, GR_GL_GEOMETRY_SHADER, geomShaderSrc); 64 GrGLCompileAndAttachShader(glCtx, programId,
65 GR_GL_GEOMETRY_SHADER, geomShaderSrc,
66 fProgramBuilder->gpu()->gpuStats());
65 if (!geomShaderId) { 67 if (!geomShaderId) {
66 return false; 68 return false;
67 } 69 }
68 *shaderIds->append() = geomShaderId; 70 *shaderIds->append() = geomShaderId;
69 return true; 71 return true;
70 } 72 }
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp ('k') | src/gpu/gl/builders/GrGLShaderStringBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698