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