diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2024-01-05 19:55:01 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-05 19:55:01 +0530 |
commit | 9f86705fa64db7c1569f9244673e97376ae75782 (patch) | |
tree | 726e0274aefef13792d85cac5198844c43dfc787 /ext/webgpu/lib.rs | |
parent | 611993fbe020a0668da103b7c1a9c2f1d9d25d4e (diff) |
chore(ext/webgpu): include GPUCanvasContext in snapshot (#21773)
Part 1 of #21713
Changes:
- Remove `.present()` and add a `presentGPUCanvasContext` (not exposed
yet to users)
- Move lazy load logic to `00_init.js`. This can be used to use webgpu
on-demand from future code (OffScreenCanvas)
Diffstat (limited to 'ext/webgpu/lib.rs')
-rw-r--r-- | ext/webgpu/lib.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/webgpu/lib.rs b/ext/webgpu/lib.rs index 834ac6bcc..abb36fb8d 100644 --- a/ext/webgpu/lib.rs +++ b/ext/webgpu/lib.rs @@ -75,7 +75,6 @@ pub mod queue; pub mod render_pass; pub mod sampler; pub mod shader; -#[cfg(feature = "surface")] pub mod surface; pub mod texture; @@ -212,7 +211,12 @@ deno_core::extension!( queue::op_webgpu_write_texture, // shader shader::op_webgpu_create_shader_module, + // surface + surface::op_webgpu_surface_configure, + surface::op_webgpu_surface_get_current_texture, + surface::op_webgpu_surface_present ], + esm = ["00_init.js", "02_surface.js"], lazy_loaded_esm = ["01_webgpu.js"], ); |