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 26 matching lines...) Expand all Loading... |
37 | 37 |
38 enum GrShaderType { | 38 enum GrShaderType { |
39 kVertex_GrShaderType, | 39 kVertex_GrShaderType, |
40 kGeometry_GrShaderType, | 40 kGeometry_GrShaderType, |
41 kFragment_GrShaderType, | 41 kFragment_GrShaderType, |
42 | 42 |
43 kLastkFragment_GrShaderType = kFragment_GrShaderType | 43 kLastkFragment_GrShaderType = kFragment_GrShaderType |
44 }; | 44 }; |
45 static const int kGrShaderTypeCount = kLastkFragment_GrShaderType + 1; | 45 static const int kGrShaderTypeCount = kLastkFragment_GrShaderType + 1; |
46 | 46 |
| 47 enum GrShaderFlags { |
| 48 kNone_GrShaderFlags = 0, |
| 49 kVertex_GrShaderFlag = 1 << kVertex_GrShaderType, |
| 50 kGeometry_GrShaderFlag = 1 << kGeometry_GrShaderType, |
| 51 kFragment_GrShaderFlag = 1 << kFragment_GrShaderType |
| 52 }; |
| 53 GR_MAKE_BITFIELD_OPS(GrShaderFlags); |
| 54 |
47 /** | 55 /** |
48 * Precisions of shader language variables. Not all shading languages support pr
ecisions or actually | 56 * Precisions of shader language variables. Not all shading languages support pr
ecisions or actually |
49 * vary the internal precision based on the qualifiers. These currently only app
ly to float types ( | 57 * vary the internal precision based on the qualifiers. These currently only app
ly to float types ( |
50 * including float vectors and matrices). | 58 * including float vectors and matrices). |
51 */ | 59 */ |
52 enum GrSLPrecision { | 60 enum GrSLPrecision { |
53 kLow_GrSLPrecision, | 61 kLow_GrSLPrecision, |
54 kMedium_GrSLPrecision, | 62 kMedium_GrSLPrecision, |
55 kHigh_GrSLPrecision, | 63 kHigh_GrSLPrecision, |
56 | 64 |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 // Takes a pointer to a GrCaps, and will suppress prints if required | 406 // Takes a pointer to a GrCaps, and will suppress prints if required |
399 #define GrCapsDebugf(caps, ...) \ | 407 #define GrCapsDebugf(caps, ...) \ |
400 if (!caps->suppressPrints()) { \ | 408 if (!caps->suppressPrints()) { \ |
401 SkDebugf(__VA_ARGS__); \ | 409 SkDebugf(__VA_ARGS__); \ |
402 } | 410 } |
403 #else | 411 #else |
404 #define GrCapsDebugf(caps, ...) | 412 #define GrCapsDebugf(caps, ...) |
405 #endif | 413 #endif |
406 | 414 |
407 #endif | 415 #endif |
OLD | NEW |