-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Appropriately mark WebGPU functions with `[Throws]`. - Add support for `AllowSharedBufferSource`. - Add support for optional arguments followed by non-optional ones.
- Loading branch information
Showing
23 changed files
with
546 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#![allow(unused_imports)] | ||
#![allow(clippy::all)] | ||
use super::*; | ||
use wasm_bindgen::prelude::*; | ||
#[cfg(web_sys_unstable_apis)] | ||
#[wasm_bindgen] | ||
extern "C" { | ||
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = GPUCanvasToneMapping)] | ||
#[derive(Debug, Clone, PartialEq, Eq)] | ||
#[doc = "The `GpuCanvasToneMapping` dictionary."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `GpuCanvasToneMapping`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
pub type GpuCanvasToneMapping; | ||
#[cfg(web_sys_unstable_apis)] | ||
#[cfg(feature = "GpuCanvasToneMappingMode")] | ||
#[doc = "Get the `mode` field of this object."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `GpuCanvasToneMapping`, `GpuCanvasToneMappingMode`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
#[wasm_bindgen(method, getter = "mode")] | ||
pub fn get_mode(this: &GpuCanvasToneMapping) -> Option<GpuCanvasToneMappingMode>; | ||
#[cfg(web_sys_unstable_apis)] | ||
#[cfg(feature = "GpuCanvasToneMappingMode")] | ||
#[doc = "Change the `mode` field of this object."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `GpuCanvasToneMapping`, `GpuCanvasToneMappingMode`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
#[wasm_bindgen(method, setter = "mode")] | ||
pub fn set_mode(this: &GpuCanvasToneMapping, val: GpuCanvasToneMappingMode); | ||
} | ||
#[cfg(web_sys_unstable_apis)] | ||
impl GpuCanvasToneMapping { | ||
#[doc = "Construct a new `GpuCanvasToneMapping`."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `GpuCanvasToneMapping`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
pub fn new() -> Self { | ||
#[allow(unused_mut)] | ||
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); | ||
ret | ||
} | ||
#[cfg(web_sys_unstable_apis)] | ||
#[cfg(feature = "GpuCanvasToneMappingMode")] | ||
#[deprecated = "Use `set_mode()` instead."] | ||
pub fn mode(&mut self, val: GpuCanvasToneMappingMode) -> &mut Self { | ||
self.set_mode(val); | ||
self | ||
} | ||
} | ||
#[cfg(web_sys_unstable_apis)] | ||
impl Default for GpuCanvasToneMapping { | ||
fn default() -> Self { | ||
Self::new() | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
crates/web-sys/src/features/gen_GpuCanvasToneMappingMode.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#![allow(unused_imports)] | ||
#![allow(clippy::all)] | ||
use wasm_bindgen::prelude::*; | ||
#[cfg(web_sys_unstable_apis)] | ||
#[wasm_bindgen] | ||
#[doc = "The `GpuCanvasToneMappingMode` enum."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `GpuCanvasToneMappingMode`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
#[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||
pub enum GpuCanvasToneMappingMode { | ||
Standard = "standard", | ||
Extended = "extended", | ||
} |
Oops, something went wrong.