| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 static const int kGrShaderTypeCount = kLastkFragment_GrShaderType + 1; | 49 static const int kGrShaderTypeCount = kLastkFragment_GrShaderType + 1; |
| 50 | 50 |
| 51 enum GrShaderFlags { | 51 enum GrShaderFlags { |
| 52 kNone_GrShaderFlags = 0, | 52 kNone_GrShaderFlags = 0, |
| 53 kVertex_GrShaderFlag = 1 << kVertex_GrShaderType, | 53 kVertex_GrShaderFlag = 1 << kVertex_GrShaderType, |
| 54 kGeometry_GrShaderFlag = 1 << kGeometry_GrShaderType, | 54 kGeometry_GrShaderFlag = 1 << kGeometry_GrShaderType, |
| 55 kFragment_GrShaderFlag = 1 << kFragment_GrShaderType | 55 kFragment_GrShaderFlag = 1 << kFragment_GrShaderType |
| 56 }; | 56 }; |
| 57 GR_MAKE_BITFIELD_OPS(GrShaderFlags); | 57 GR_MAKE_BITFIELD_OPS(GrShaderFlags); |
| 58 | 58 |
| 59 enum class GrDrawFace { | |
| 60 kInvalid = -1, | |
| 61 | |
| 62 kBoth, | |
| 63 kCCW, | |
| 64 kCW, | |
| 65 }; | |
| 66 | |
| 67 /** | 59 /** |
| 68 * Precisions of shader language variables. Not all shading languages support pr
ecisions or actually | 60 * Precisions of shader language variables. Not all shading languages support pr
ecisions or actually |
| 69 * vary the internal precision based on the qualifiers. These currently only app
ly to float types ( | 61 * vary the internal precision based on the qualifiers. These currently only app
ly to float types ( |
| 70 * including float vectors and matrices). | 62 * including float vectors and matrices). |
| 71 */ | 63 */ |
| 72 enum GrSLPrecision { | 64 enum GrSLPrecision { |
| 73 kLow_GrSLPrecision, | 65 kLow_GrSLPrecision, |
| 74 kMedium_GrSLPrecision, | 66 kMedium_GrSLPrecision, |
| 75 kHigh_GrSLPrecision, | 67 kHigh_GrSLPrecision, |
| 76 | 68 |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 /** Holder destroys the backend object. */ | 488 /** Holder destroys the backend object. */ |
| 497 kOwned = true | 489 kOwned = true |
| 498 }; | 490 }; |
| 499 | 491 |
| 500 template <typename T> T * const * sk_sp_address_as_pointer_address(sk_sp<T> cons
t * sp) { | 492 template <typename T> T * const * sk_sp_address_as_pointer_address(sk_sp<T> cons
t * sp) { |
| 501 static_assert(sizeof(T*) == sizeof(sk_sp<T>), "sk_sp not expected size."); | 493 static_assert(sizeof(T*) == sizeof(sk_sp<T>), "sk_sp not expected size."); |
| 502 return reinterpret_cast<T * const *>(sp); | 494 return reinterpret_cast<T * const *>(sp); |
| 503 } | 495 } |
| 504 | 496 |
| 505 #endif | 497 #endif |
| OLD | NEW |