aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gpubuffer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/gpubuffer.rs')
-rw-r--r--components/script/dom/gpubuffer.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/components/script/dom/gpubuffer.rs b/components/script/dom/gpubuffer.rs
index 160ef6cf79c..8cc9bc52249 100644
--- a/components/script/dom/gpubuffer.rs
+++ b/components/script/dom/gpubuffer.rs
@@ -79,6 +79,20 @@ impl GPUBuffer {
}
}
+impl GPUBuffer {
+ pub fn id(&self) -> WebGPUBuffer {
+ self.buffer
+ }
+
+ pub fn size(&self) -> GPUBufferSize {
+ self.size
+ }
+
+ pub fn usage(&self) -> u32 {
+ self.usage
+ }
+}
+
impl Drop for GPUBuffer {
fn drop(&mut self) {
self.Destroy()