MCPcopy Create free account
hub / github.com/DjDeveloperr/deno_desktop / op_webgpu_create_surface

Function op_webgpu_create_surface

src/surface.rs:65–74  ·  view source on GitHub ↗
(
    state: &mut OpState,
    args: CreateSurfaceArgs,
    _: (),
)

Source from the content-addressed store, hash-verified

63}
64
65pub fn op_webgpu_create_surface(
66 state: &mut OpState,
67 args: CreateSurfaceArgs,
68 _: (),
69) -> Result<ResourceId, AnyError> {
70 let winres = get_resource::<WindowResource>(&mut state.resource_table, args.window_rid)?;
71 let instance = state.borrow::<Instance>();
72 let surface_id = instance.instance_create_surface(&winres.0, std::marker::PhantomData);
73 Ok(state.resource_table.add(WebGpuSurface(surface_id)))
74}
75
76#[derive(Deserialize)]
77#[serde(rename_all = "camelCase")]

Callers

nothing calls this directly

Calls 2

WebGpuSurfaceClass · 0.85
addMethod · 0.45

Tested by

no test coverage detected