From 9f86705fa64db7c1569f9244673e97376ae75782 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Fri, 5 Jan 2024 19:55:01 +0530 Subject: 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) --- ext/webgpu/error.rs | 2 -- 1 file changed, 2 deletions(-) (limited to 'ext/webgpu/error.rs') diff --git a/ext/webgpu/error.rs b/ext/webgpu/error.rs index be8021f87..5d8abb4a3 100644 --- a/ext/webgpu/error.rs +++ b/ext/webgpu/error.rs @@ -23,7 +23,6 @@ use wgpu_core::device::DeviceError; use wgpu_core::pipeline::CreateComputePipelineError; use wgpu_core::pipeline::CreateRenderPipelineError; use wgpu_core::pipeline::CreateShaderModuleError; -#[cfg(feature = "surface")] use wgpu_core::present::ConfigureSurfaceError; use wgpu_core::resource::BufferAccessError; use wgpu_core::resource::CreateBufferError; @@ -282,7 +281,6 @@ impl From for WebGpuError { } } -#[cfg(feature = "surface")] impl From for WebGpuError { fn from(err: ConfigureSurfaceError) -> Self { WebGpuError::Validation(fmt_err(&err)) -- cgit v1.2.3