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 "GrGLShaderBuilder.h" | 8 #include "GrGLShaderBuilder.h" |
| 9 #include "GrGLFullProgramBuilder.h" |
9 #include "GrGLProgramBuilder.h" | 10 #include "GrGLProgramBuilder.h" |
10 #include "../GrGpuGL.h" | 11 #include "../GrGpuGL.h" |
11 #include "../GrGLShaderVar.h" | 12 #include "../GrGLShaderVar.h" |
12 | 13 |
13 namespace { | 14 namespace { |
14 inline const char* sample_function_name(GrSLType type, GrGLSLGeneration glslGen)
{ | 15 inline const char* sample_function_name(GrSLType type, GrGLSLGeneration glslGen)
{ |
15 if (kVec2f_GrSLType == type) { | 16 if (kVec2f_GrSLType == type) { |
16 return glslGen >= k130_GrGLSLGeneration ? "texture" : "texture2D"; | 17 return glslGen >= k130_GrGLSLGeneration ? "texture" : "texture2D"; |
17 } else { | 18 } else { |
18 SkASSERT(kVec3f_GrSLType == type); | 19 SkASSERT(kVec3f_GrSLType == type); |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 coordName, | 153 coordName, |
153 configComponentMask, | 154 configComponentMask, |
154 swizzle, | 155 swizzle, |
155 kVec2f_GrSLType); | 156 kVec2f_GrSLType); |
156 } | 157 } |
157 | 158 |
158 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 159 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
159 GrGLFullShaderBuilder::GrGLFullShaderBuilder(GrGLFullProgramBuilder* program) | 160 GrGLFullShaderBuilder::GrGLFullShaderBuilder(GrGLFullProgramBuilder* program) |
160 : INHERITED(program) | 161 : INHERITED(program) |
161 , fFullProgramBuilder(program) {} | 162 , fFullProgramBuilder(program) {} |
OLD | NEW |