Skip to content

Commit 7441bd1

Browse files
committed
chore: updates
1 parent 284f469 commit 7441bd1

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

napi/canvas-napi/src/gl.rs renamed to napi/canvas-napi/src/gl/mod.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
use napi::*;
22
use napi_derive::napi;
33
use std::ffi::{c_void, CString};
4-
#[napi(js_name = "WebGLRenderingContext")]
5-
pub struct JSWebGLRenderingContext {
4+
#[napi]
5+
pub struct WebGLRenderingContext {
66
state: *mut canvas_c::WebGLState,
77
}
88

99

1010
#[napi]
11-
impl JSWebGLRenderingContext {
11+
impl WebGLRenderingContext {
1212

1313
// #[napi]
1414
// pub fn render(&self) {
@@ -40,7 +40,7 @@ impl JSWebGLRenderingContext {
4040
stencil: bool,
4141
desynchronized: bool,
4242
xr_compatible: bool
43-
) -> Result<JSWebGLRenderingContext> {
43+
) -> Result<WebGLRenderingContext> {
4444
let ret = canvas_c::canvas_native_webgl_create(
4545
view as _,
4646
version,
@@ -60,7 +60,7 @@ impl JSWebGLRenderingContext {
6060
return Err(napi::Error::from_reason("Invalid parameter"));
6161
}
6262

63-
Ok(JSWebGLRenderingContext {
63+
Ok(WebGLRenderingContext {
6464
state: ret
6565
})
6666
}
@@ -81,7 +81,7 @@ impl JSWebGLRenderingContext {
8181
desynchronized: bool,
8282
xr_compatible: bool,
8383
is_canvas: bool,
84-
) -> Result<JSWebGLRenderingContext> {
84+
) -> Result<WebGLRenderingContext> {
8585
let ret = canvas_c::canvas_native_webgl_create_no_window(
8686
width,
8787
height,
@@ -103,7 +103,7 @@ impl JSWebGLRenderingContext {
103103
return Err(napi::Error::from_reason("Invalid parameter"));
104104
}
105105

106-
Ok(JSWebGLRenderingContext {
106+
Ok(WebGLRenderingContext {
107107
state: ret
108108
})
109109
}

napi/canvas-napi/src/gpu/mod.rs

Whitespace-only changes.

napi/canvas-napi/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ extern crate napi_derive;
1111
pub mod gl;
1212
pub mod c2d;
1313
pub mod image_asset;
14-
pub mod dom_matrix;
14+
pub mod dom_matrix;
15+
mod gpu;

0 commit comments

Comments
 (0)