| 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 |
| 59 /** | 67 /** |
| 60 * Precisions of shader language variables. Not all shading languages support pr
ecisions or actually | 68 * Precisions of shader language variables. Not all shading languages support pr
ecisions or actually |
| 61 * vary the internal precision based on the qualifiers. These currently only app
ly to float types ( | 69 * vary the internal precision based on the qualifiers. These currently only app
ly to float types ( |
| 62 * including float vectors and matrices). | 70 * including float vectors and matrices). |
| 63 */ | 71 */ |
| 64 enum GrSLPrecision { | 72 enum GrSLPrecision { |
| 65 kLow_GrSLPrecision, | 73 kLow_GrSLPrecision, |
| 66 kMedium_GrSLPrecision, | 74 kMedium_GrSLPrecision, |
| 67 kHigh_GrSLPrecision, | 75 kHigh_GrSLPrecision, |
| 68 | 76 |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 /** Holder destroys the backend object. */ | 496 /** Holder destroys the backend object. */ |
| 489 kOwned = true | 497 kOwned = true |
| 490 }; | 498 }; |
| 491 | 499 |
| 492 template <typename T> T * const * sk_sp_address_as_pointer_address(sk_sp<T> cons
t * sp) { | 500 template <typename T> T * const * sk_sp_address_as_pointer_address(sk_sp<T> cons
t * sp) { |
| 493 static_assert(sizeof(T*) == sizeof(sk_sp<T>), "sk_sp not expected size."); | 501 static_assert(sizeof(T*) == sizeof(sk_sp<T>), "sk_sp not expected size."); |
| 494 return reinterpret_cast<T * const *>(sp); | 502 return reinterpret_cast<T * const *>(sp); |
| 495 } | 503 } |
| 496 | 504 |
| 497 #endif | 505 #endif |
| OLD | NEW |