OLD | NEW |
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 fOutputs[i].getName().c_str(), | 55 fOutputs[i].getName().c_str(), |
56 fInputs[i].getName().c_str()); | 56 fInputs[i].getName().c_str()); |
57 } | 57 } |
58 geomShaderSrc.append("\t\tEmitVertex();\n" | 58 geomShaderSrc.append("\t\tEmitVertex();\n" |
59 "\t}\n" | 59 "\t}\n" |
60 "\tEndPrimitive();\n"); | 60 "\tEndPrimitive();\n"); |
61 geomShaderSrc.append("}\n"); | 61 geomShaderSrc.append("}\n"); |
62 GrGLuint geomShaderId = | 62 GrGLuint geomShaderId = |
63 GrGLCompileAndAttachShader(glCtx, programId, | 63 GrGLCompileAndAttachShader(glCtx, programId, |
64 GR_GL_GEOMETRY_SHADER, geomShaderSrc, | 64 GR_GL_GEOMETRY_SHADER, geomShaderSrc, |
65 fProgramBuilder->gpu()->gpuStats()); | 65 fProgramBuilder->gpu()->stats()); |
66 if (!geomShaderId) { | 66 if (!geomShaderId) { |
67 return false; | 67 return false; |
68 } | 68 } |
69 *shaderIds->append() = geomShaderId; | 69 *shaderIds->append() = geomShaderId; |
70 return true; | 70 return true; |
71 } | 71 } |
OLD | NEW |