diff options
author | atbrakhi <atbrakhi@igalia.com> | 2024-11-28 15:24:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-28 14:24:15 +0000 |
commit | d2d3407501b83d03db522b5dde5e159073fd9e4b (patch) | |
tree | 299be7d04ca2470f1c6c8741e46784a2c7e85dd7 /components/script/dom/gpudevicelostinfo.rs | |
parent | a37ccc3e64c92e8ba10a3cdc48ebd7f031bb7298 (diff) | |
download | servo-d2d3407501b83d03db522b5dde5e159073fd9e4b.tar.gz servo-d2d3407501b83d03db522b5dde5e159073fd9e4b.zip |
Move script gpu files into webgpu folder (#34415)
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Diffstat (limited to 'components/script/dom/gpudevicelostinfo.rs')
-rw-r--r-- | components/script/dom/gpudevicelostinfo.rs | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/components/script/dom/gpudevicelostinfo.rs b/components/script/dom/gpudevicelostinfo.rs deleted file mode 100644 index 3219c0fe202..00000000000 --- a/components/script/dom/gpudevicelostinfo.rs +++ /dev/null @@ -1,54 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ - -#![allow(dead_code)] - -use dom_struct::dom_struct; - -use super::bindings::codegen::Bindings::WebGPUBinding::GPUDeviceLostReason; -use crate::dom::bindings::codegen::Bindings::WebGPUBinding::GPUDeviceLostInfoMethods; -use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; -use crate::dom::bindings::root::DomRoot; -use crate::dom::bindings::str::DOMString; -use crate::dom::globalscope::GlobalScope; - -#[dom_struct] -pub struct GPUDeviceLostInfo { - reflector_: Reflector, - message: DOMString, - reason: GPUDeviceLostReason, -} - -impl GPUDeviceLostInfo { - fn new_inherited(message: DOMString, reason: GPUDeviceLostReason) -> Self { - Self { - reflector_: Reflector::new(), - message, - reason, - } - } - - pub fn new( - global: &GlobalScope, - message: DOMString, - reason: GPUDeviceLostReason, - ) -> DomRoot<Self> { - reflect_dom_object( - Box::new(GPUDeviceLostInfo::new_inherited(message, reason)), - global, - ) - } -} - -impl GPUDeviceLostInfoMethods<crate::DomTypeHolder> for GPUDeviceLostInfo { - /// <https://gpuweb.github.io/gpuweb/#dom-gpudevicelostinfo-message> - fn Message(&self) -> DOMString { - self.message.clone() - } - - /// <https://gpuweb.github.io/gpuweb/#dom-gpudevicelostinfo-reason> - fn Reason(&self) -> GPUDeviceLostReason { - self.reason - } -} |