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

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

Issue 23185004: Rename kES2_GrGLBinding to kES_GrGLBinding. Step 0 for supporting ES3. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/GrGLShaderBuilder.cpp ('k') | src/gpu/gl/GrGLUtil.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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 297
298 void appendArrayAccess(const char* indexName, SkString* out) const { 298 void appendArrayAccess(const char* indexName, SkString* out) const {
299 out->appendf("%s[%s]%s", 299 out->appendf("%s[%s]%s",
300 this->getName().c_str(), 300 this->getName().c_str(),
301 indexName, 301 indexName,
302 fUseUniformFloatArrays ? "" : ".x"); 302 fUseUniformFloatArrays ? "" : ".x");
303 } 303 }
304 304
305 static const char* PrecisionString(Precision p, GrGLBinding binding) { 305 static const char* PrecisionString(Precision p, GrGLBinding binding) {
306 // Desktop GLSL has added precision qualifiers but they don't do anythin g. 306 // Desktop GLSL has added precision qualifiers but they don't do anythin g.
307 if (kES2_GrGLBinding == binding) { 307 if (kES_GrGLBinding == binding) {
308 switch (p) { 308 switch (p) {
309 case kLow_Precision: 309 case kLow_Precision:
310 return "lowp "; 310 return "lowp ";
311 case kMedium_Precision: 311 case kMedium_Precision:
312 return "mediump "; 312 return "mediump ";
313 case kHigh_Precision: 313 case kHigh_Precision:
314 return "highp "; 314 return "highp ";
315 case kDefault_Precision: 315 case kDefault_Precision:
316 return ""; 316 return "";
317 default: 317 default:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 SkString fName; 351 SkString fName;
352 int fCount; 352 int fCount;
353 Precision fPrecision; 353 Precision fPrecision;
354 Origin fOrigin; 354 Origin fOrigin;
355 /// Work around driver bugs on some hardware that don't correctly 355 /// Work around driver bugs on some hardware that don't correctly
356 /// support uniform float [] 356 /// support uniform float []
357 bool fUseUniformFloatArrays; 357 bool fUseUniformFloatArrays;
358 }; 358 };
359 359
360 #endif 360 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLShaderBuilder.cpp ('k') | src/gpu/gl/GrGLUtil.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698