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

Side by Side Diff: include/gpu/GrTypesPriv.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/GrTypes.h ('k') | src/gpu/GrCoordTransform.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 2013 Google Inc. 2 * Copyright 2013 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 GrTypesPriv_DEFINED 8 #ifndef GrTypesPriv_DEFINED
9 #define GrTypesPriv_DEFINED 9 #define GrTypesPriv_DEFINED
10 10
(...skipping 11 matching lines...) Expand all
22 kVec3f_GrSLType, 22 kVec3f_GrSLType,
23 kVec4f_GrSLType, 23 kVec4f_GrSLType,
24 kMat33f_GrSLType, 24 kMat33f_GrSLType,
25 kMat44f_GrSLType, 25 kMat44f_GrSLType,
26 kSampler2D_GrSLType, 26 kSampler2D_GrSLType,
27 27
28 kLast_GrSLType = kSampler2D_GrSLType 28 kLast_GrSLType = kSampler2D_GrSLType
29 }; 29 };
30 static const int kGrSLTypeCount = kLast_GrSLType + 1; 30 static const int kGrSLTypeCount = kLast_GrSLType + 1;
31 31
32 enum GrShaderType {
33 kVertex_GrShaderType,
34 kGeometry_GrShaderType,
35 kFragment_GrShaderType,
36
37 kLastkFragment_GrShaderType = kFragment_GrShaderType
38 };
39 static const int kGrShaderTypeCount = kLastkFragment_GrShaderType + 1;
40
32 /** 41 /**
33 * Gets the vector size of the SLType. Returns -1 for void, matrices, and sample rs. 42 * Gets the vector size of the SLType. Returns -1 for void, matrices, and sample rs.
34 */ 43 */
35 static inline int GrSLTypeVectorCount(GrSLType type) { 44 static inline int GrSLTypeVectorCount(GrSLType type) {
36 SkASSERT(type >= 0 && type < static_cast<GrSLType>(kGrSLTypeCount)); 45 SkASSERT(type >= 0 && type < static_cast<GrSLType>(kGrSLTypeCount));
37 static const int kCounts[] = { -1, 1, 2, 3, 4, -1, -1, -1 }; 46 static const int kCounts[] = { -1, 1, 2, 3, 4, -1, -1, -1 };
38 return kCounts[type]; 47 return kCounts[type];
39 48
40 GR_STATIC_ASSERT(0 == kVoid_GrSLType); 49 GR_STATIC_ASSERT(0 == kVoid_GrSLType);
41 GR_STATIC_ASSERT(1 == kFloat_GrSLType); 50 GR_STATIC_ASSERT(1 == kFloat_GrSLType);
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 /** 200 /**
192 * Indicates the type of pending IO operations that can be recorded for gpu reso urces. 201 * Indicates the type of pending IO operations that can be recorded for gpu reso urces.
193 */ 202 */
194 enum GrIOType { 203 enum GrIOType {
195 kRead_GrIOType, 204 kRead_GrIOType,
196 kWrite_GrIOType, 205 kWrite_GrIOType,
197 kRW_GrIOType 206 kRW_GrIOType
198 }; 207 };
199 208
200 #endif 209 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrTypes.h ('k') | src/gpu/GrCoordTransform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698