@@ -4,65 +4,73 @@ use wasm_bindgen::prelude::*;
4
4
#[ cfg( web_sys_unstable_apis) ]
5
5
#[ wasm_bindgen]
6
6
extern "C" {
7
- # [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = GPUPresentationContext , typescript_type = "GPUPresentationContext " ) ]
7
+ # [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = GPUCanvasContext , typescript_type = "GPUCanvasContext " ) ]
8
8
#[ derive( Debug , Clone , PartialEq , Eq ) ]
9
- #[ doc = "The `GpuPresentationContext ` class." ]
9
+ #[ doc = "The `GpuCanvasContext ` class." ]
10
10
#[ doc = "" ]
11
- #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUPresentationContext )" ]
11
+ #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCanvasContext )" ]
12
12
#[ doc = "" ]
13
- #[ doc = "*This API requires the following crate features to be activated: `GpuPresentationContext `*" ]
13
+ #[ doc = "*This API requires the following crate features to be activated: `GpuCanvasContext `*" ]
14
14
#[ doc = "" ]
15
15
#[ doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as" ]
16
16
#[ doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*" ]
17
- pub type GpuPresentationContext ;
17
+ pub type GpuCanvasContext ;
18
18
#[ cfg( web_sys_unstable_apis) ]
19
- #[ cfg( feature = "GpuPresentationConfiguration" ) ]
20
- # [ wasm_bindgen ( method , structural , js_class = "GPUPresentationContext" , js_name = configure) ]
19
+ # [ wasm_bindgen ( structural , method , getter , js_class = "GPUCanvasContext" , js_name = canvas) ]
20
+ #[ doc = "Getter for the `canvas` field of this object." ]
21
+ #[ doc = "" ]
22
+ #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCanvasContext/canvas)" ]
23
+ #[ doc = "" ]
24
+ #[ doc = "*This API requires the following crate features to be activated: `GpuCanvasContext`*" ]
25
+ #[ doc = "" ]
26
+ #[ doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as" ]
27
+ #[ doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*" ]
28
+ pub fn canvas ( this : & GpuCanvasContext ) -> :: js_sys:: Object ;
29
+ #[ cfg( web_sys_unstable_apis) ]
30
+ #[ cfg( feature = "GpuCanvasConfiguration" ) ]
31
+ # [ wasm_bindgen ( method , structural , js_class = "GPUCanvasContext" , js_name = configure) ]
21
32
#[ doc = "The `configure()` method." ]
22
33
#[ doc = "" ]
23
- #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUPresentationContext /configure)" ]
34
+ #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCanvasContext /configure)" ]
24
35
#[ doc = "" ]
25
- #[ doc = "*This API requires the following crate features to be activated: `GpuPresentationConfiguration `, `GpuPresentationContext `*" ]
36
+ #[ doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration `, `GpuCanvasContext `*" ]
26
37
#[ doc = "" ]
27
38
#[ doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as" ]
28
39
#[ doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*" ]
29
- pub fn configure ( this : & GpuPresentationContext , configuration : & GpuPresentationConfiguration ) ;
40
+ pub fn configure ( this : & GpuCanvasContext , configuration : & GpuCanvasConfiguration ) ;
30
41
#[ cfg( web_sys_unstable_apis) ]
31
42
#[ cfg( feature = "GpuTexture" ) ]
32
- # [ wasm_bindgen ( method , structural , js_class = "GPUPresentationContext " , js_name = getCurrentTexture) ]
43
+ # [ wasm_bindgen ( method , structural , js_class = "GPUCanvasContext " , js_name = getCurrentTexture) ]
33
44
#[ doc = "The `getCurrentTexture()` method." ]
34
45
#[ doc = "" ]
35
- #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUPresentationContext /getCurrentTexture)" ]
46
+ #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCanvasContext /getCurrentTexture)" ]
36
47
#[ doc = "" ]
37
- #[ doc = "*This API requires the following crate features to be activated: `GpuPresentationContext `, `GpuTexture`*" ]
48
+ #[ doc = "*This API requires the following crate features to be activated: `GpuCanvasContext `, `GpuTexture`*" ]
38
49
#[ doc = "" ]
39
50
#[ doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as" ]
40
51
#[ doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*" ]
41
- pub fn get_current_texture ( this : & GpuPresentationContext ) -> GpuTexture ;
52
+ pub fn get_current_texture ( this : & GpuCanvasContext ) -> GpuTexture ;
42
53
#[ cfg( web_sys_unstable_apis) ]
43
54
#[ cfg( all( feature = "GpuAdapter" , feature = "GpuTextureFormat" , ) ) ]
44
- # [ wasm_bindgen ( method , structural , js_class = "GPUPresentationContext " , js_name = getPreferredFormat) ]
55
+ # [ wasm_bindgen ( method , structural , js_class = "GPUCanvasContext " , js_name = getPreferredFormat) ]
45
56
#[ doc = "The `getPreferredFormat()` method." ]
46
57
#[ doc = "" ]
47
- #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUPresentationContext /getPreferredFormat)" ]
58
+ #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCanvasContext /getPreferredFormat)" ]
48
59
#[ doc = "" ]
49
- #[ doc = "*This API requires the following crate features to be activated: `GpuAdapter`, `GpuPresentationContext `, `GpuTextureFormat`*" ]
60
+ #[ doc = "*This API requires the following crate features to be activated: `GpuAdapter`, `GpuCanvasContext `, `GpuTextureFormat`*" ]
50
61
#[ doc = "" ]
51
62
#[ doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as" ]
52
63
#[ doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*" ]
53
- pub fn get_preferred_format (
54
- this : & GpuPresentationContext ,
55
- adapter : & GpuAdapter ,
56
- ) -> GpuTextureFormat ;
64
+ pub fn get_preferred_format ( this : & GpuCanvasContext , adapter : & GpuAdapter ) -> GpuTextureFormat ;
57
65
#[ cfg( web_sys_unstable_apis) ]
58
- # [ wasm_bindgen ( method , structural , js_class = "GPUPresentationContext " , js_name = unconfigure) ]
66
+ # [ wasm_bindgen ( method , structural , js_class = "GPUCanvasContext " , js_name = unconfigure) ]
59
67
#[ doc = "The `unconfigure()` method." ]
60
68
#[ doc = "" ]
61
- #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUPresentationContext /unconfigure)" ]
69
+ #[ doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUCanvasContext /unconfigure)" ]
62
70
#[ doc = "" ]
63
- #[ doc = "*This API requires the following crate features to be activated: `GpuPresentationContext `*" ]
71
+ #[ doc = "*This API requires the following crate features to be activated: `GpuCanvasContext `*" ]
64
72
#[ doc = "" ]
65
73
#[ doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as" ]
66
74
#[ doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*" ]
67
- pub fn unconfigure ( this : & GpuPresentationContext ) ;
75
+ pub fn unconfigure ( this : & GpuCanvasContext ) ;
68
76
}
0 commit comments