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

Side by Side Diff: src/gpu/gl/GrGLShaderVar.h

Issue 766753006: clean up default precision handling (Closed) Base URL: https://skia.googlesource.com/skia.git@precision
Patch Set: Created 6 years 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 | « include/gpu/GrShaderVar.h ('k') | src/gpu/gl/builders/GrGLFragmentShaderBuilder.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 #ifndef GrGLShaderVar_DEFINED 8 #ifndef GrGLShaderVar_DEFINED
9 #define GrGLShaderVar_DEFINED 9 #define GrGLShaderVar_DEFINED
10 10
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 static const char* PrecisionString(Precision p, GrGLStandard standard) { 200 static const char* PrecisionString(Precision p, GrGLStandard standard) {
201 // Desktop GLSL has added precision qualifiers but they don't do anythin g. 201 // Desktop GLSL has added precision qualifiers but they don't do anythin g.
202 if (kGLES_GrGLStandard == standard) { 202 if (kGLES_GrGLStandard == standard) {
203 switch (p) { 203 switch (p) {
204 case kLow_Precision: 204 case kLow_Precision:
205 return "lowp "; 205 return "lowp ";
206 case kMedium_Precision: 206 case kMedium_Precision:
207 return "mediump "; 207 return "mediump ";
208 case kHigh_Precision: 208 case kHigh_Precision:
209 return "highp "; 209 return "highp ";
210 case kDefault_Precision:
211 return "";
212 default: 210 default:
213 SkFAIL("Unexpected precision type."); 211 SkFAIL("Unexpected precision type.");
214 } 212 }
215 } 213 }
216 return ""; 214 return "";
217 } 215 }
218 216
219 private: 217 private:
220 static const char* TypeModifierString(TypeModifier t, GrGLSLGeneration gen) { 218 static const char* TypeModifierString(TypeModifier t, GrGLSLGeneration gen) {
221 switch (t) { 219 switch (t) {
(...skipping 21 matching lines...) Expand all
243 241
244 Origin fOrigin; 242 Origin fOrigin;
245 /// Work around driver bugs on some hardware that don't correctly 243 /// Work around driver bugs on some hardware that don't correctly
246 /// support uniform float [] 244 /// support uniform float []
247 bool fUseUniformFloatArrays; 245 bool fUseUniformFloatArrays;
248 246
249 typedef GrShaderVar INHERITED; 247 typedef GrShaderVar INHERITED;
250 }; 248 };
251 249
252 #endif 250 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrShaderVar.h ('k') | src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698