OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |