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

Side by Side Diff: src/gpu/gl/GrGLGLSL.cpp

Issue 1414373002: Move shader precision modifier check onto GLSLCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 2 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
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698