OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "GrGLGLSL.h" | 8 #include "GrGLGLSL.h" |
| 9 #include "GrGLContext.h" |
9 #include "GrGLShaderVar.h" | 10 #include "GrGLShaderVar.h" |
| 11 #include "GrGLUtil.h" |
10 #include "SkString.h" | 12 #include "SkString.h" |
11 | 13 |
12 bool GrGLGetGLSLGeneration(const GrGLInterface* gl, GrGLSLGeneration* generation
) { | 14 bool GrGLGetGLSLGeneration(const GrGLInterface* gl, GrGLSLGeneration* generation
) { |
13 SkASSERT(generation); | 15 SkASSERT(generation); |
14 GrGLSLVersion ver = GrGLGetGLSLVersion(gl); | 16 GrGLSLVersion ver = GrGLGetGLSLVersion(gl); |
15 if (GR_GLSL_INVALID_VER == ver) { | 17 if (GR_GLSL_INVALID_VER == ver) { |
16 return false; | 18 return false; |
17 } | 19 } |
18 switch (gl->fStandard) { | 20 switch (gl->fStandard) { |
19 case kGL_GrGLStandard: | 21 case kGL_GrGLStandard: |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 out->append("precision mediump float;\n"); | 102 out->append("precision mediump float;\n"); |
101 break; | 103 break; |
102 case kLow_GrSLPrecision: | 104 case kLow_GrSLPrecision: |
103 out->append("precision lowp float;\n"); | 105 out->append("precision lowp float;\n"); |
104 break; | 106 break; |
105 default: | 107 default: |
106 SkFAIL("Unknown precision value."); | 108 SkFAIL("Unknown precision value."); |
107 } | 109 } |
108 } | 110 } |
109 } | 111 } |
OLD | NEW |