OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 GrTypes_DEFINED | 8 #ifndef GrTypes_DEFINED |
9 #define GrTypes_DEFINED | 9 #define GrTypes_DEFINED |
10 | 10 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 return n ? (1 << (32 - SkCLZ(n - 1))) : 1; | 119 return n ? (1 << (32 - SkCLZ(n - 1))) : 1; |
120 } | 120 } |
121 | 121 |
122 /////////////////////////////////////////////////////////////////////////////// | 122 /////////////////////////////////////////////////////////////////////////////// |
123 | 123 |
124 /** | 124 /** |
125 * Possible 3D APIs that may be used by Ganesh. | 125 * Possible 3D APIs that may be used by Ganesh. |
126 */ | 126 */ |
127 enum GrBackend { | 127 enum GrBackend { |
128 kOpenGL_GrBackend, | 128 kOpenGL_GrBackend, |
| 129 kVulkan_GrBackend, |
| 130 |
| 131 kLast_GrBackend = kVulkan_GrBackend |
129 }; | 132 }; |
| 133 const int kBackendCount = kLast_GrBackend + 1; |
130 | 134 |
131 /** | 135 /** |
132 * Backend-specific 3D context handle | 136 * Backend-specific 3D context handle |
133 * GrGLInterface* for OpenGL. If NULL will use the default GL interface. | 137 * GrGLInterface* for OpenGL. If NULL will use the default GL interface. |
134 */ | 138 */ |
135 typedef intptr_t GrBackendContext; | 139 typedef intptr_t GrBackendContext; |
136 | 140 |
137 /////////////////////////////////////////////////////////////////////////////// | 141 /////////////////////////////////////////////////////////////////////////////// |
138 | 142 |
139 /** | 143 /** |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 return 4 * width * height; | 623 return 4 * width * height; |
620 } | 624 } |
621 } | 625 } |
622 | 626 |
623 /** | 627 /** |
624 * This value translates to reseting all the context state for any backend. | 628 * This value translates to reseting all the context state for any backend. |
625 */ | 629 */ |
626 static const uint32_t kAll_GrBackendState = 0xffffffff; | 630 static const uint32_t kAll_GrBackendState = 0xffffffff; |
627 | 631 |
628 #endif | 632 #endif |
OLD | NEW |