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

Side by Side Diff: include/gpu/GrShaderVar.h

Issue 778783002: Use texture size to determine precision of texture coord varyings (Closed) Base URL: https://skia.googlesource.com/skia.git@defaultp
Patch Set: include skrandom.h in new gm cpp 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/GrCoordTransform.h ('k') | include/gpu/GrTypes.h » ('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 2014 Google Inc. 2 * Copyright 2014 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 GrShaderVar_DEFINED 8 #ifndef GrShaderVar_DEFINED
9 #define GrShaderVar_DEFINED 9 #define GrShaderVar_DEFINED
10 10
(...skipping 24 matching lines...) Expand all
35 }; 35 };
36 36
37 enum Precision { 37 enum Precision {
38 kLow_Precision, 38 kLow_Precision,
39 kMedium_Precision, 39 kMedium_Precision,
40 kHigh_Precision, 40 kHigh_Precision,
41 41
42 // Default precision is medium. This is because on OpenGL ES 2 highp sup port is not 42 // Default precision is medium. This is because on OpenGL ES 2 highp sup port is not
43 // guaranteed. On (non-ES) OpenGL the specifiers have no effect on preci sion. 43 // guaranteed. On (non-ES) OpenGL the specifiers have no effect on preci sion.
44 kDefault_Precision = kMedium_Precision, 44 kDefault_Precision = kMedium_Precision,
45
46 kLast_Precision = kHigh_Precision
45 }; 47 };
48 static const int kPrecisionCount = kLast_Precision + 1;
46 49
47 /** 50 /**
48 * Defaults to a float with no precision specifier 51 * Defaults to a float with no precision specifier
49 */ 52 */
50 GrShaderVar() 53 GrShaderVar()
51 : fType(kFloat_GrSLType) 54 : fType(kFloat_GrSLType)
52 , fTypeModifier(kNone_TypeModifier) 55 , fTypeModifier(kNone_TypeModifier)
53 , fCount(kNonArray) 56 , fCount(kNonArray)
54 , fPrecision(kDefault_Precision) { 57 , fPrecision(kDefault_Precision) {
55 } 58 }
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 226
224 protected: 227 protected:
225 GrSLType fType; 228 GrSLType fType;
226 TypeModifier fTypeModifier; 229 TypeModifier fTypeModifier;
227 SkString fName; 230 SkString fName;
228 int fCount; 231 int fCount;
229 Precision fPrecision; 232 Precision fPrecision;
230 }; 233 };
231 234
232 #endif 235 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrCoordTransform.h ('k') | include/gpu/GrTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698