1 | use skia_bindings as sb; |
2 | |
3 | pub use skia_bindings::skgpu_BackendApi as BackendApi; |
4 | variant_name!(BackendApi::Metal); |
5 | |
6 | #[repr (C)] |
7 | #[derive (Copy, Clone, PartialEq, Eq, Debug)] |
8 | pub struct Budgeted(bool); |
9 | |
10 | native_transmutable!(sb::skgpu_Budgeted, Budgeted, budgeted_layout); |
11 | |
12 | #[allow (non_upper_case_globals)] |
13 | impl Budgeted { |
14 | #[deprecated (since = "0.29.0" , note = "use No" )] |
15 | pub const NO: Budgeted = Budgeted(false); |
16 | #[deprecated (since = "0.29.0" , note = "use Yes" )] |
17 | pub const YES: Budgeted = Budgeted(true); |
18 | |
19 | // we want this look like enum case names. |
20 | pub const No: Budgeted = Budgeted(false); |
21 | pub const Yes: Budgeted = Budgeted(true); |
22 | } |
23 | |
24 | // TODO: CallbackResult |
25 | |
26 | // TODO: this should be a newtype(bool) I guess with implementations |
27 | // of From<bool> and Deref? |
28 | pub use skia_bindings::skgpu_Mipmapped as Mipmapped; |
29 | |
30 | // TODO: this should be a newtype(bool) I guess with implementations |
31 | // of From<bool> and Deref? |
32 | pub use skia_bindings::skgpu_Protected as Protected; |
33 | variant_name!(Protected::Yes); |
34 | |
35 | // TODO: this should be a newtype(bool) I guess with implementations |
36 | // of From<bool> and Deref? |
37 | pub use skia_bindings::skgpu_Renderable as Renderable; |
38 | variant_name!(Renderable::No); |
39 | |
40 | pub use skia_bindings::skgpu_Origin as Origin; |
41 | variant_name!(Origin::TopLeft); |
42 | |