aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gpucanvascontext.rs
blob: f47e1dfddd1fd3199e8a5fc8701a4c3f313b9a88 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* 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/. */

use dom_struct::dom_struct;
use webrender_api::ImageKey;

use crate::dom::bindings::codegen::Bindings::GPUCanvasContextBinding::GPUCanvasContextMethods;
use crate::dom::bindings::codegen::UnionTypes;
use crate::dom::bindings::reflector::Reflector;
use crate::dom::bindings::root::LayoutDom;
use crate::dom::htmlcanvaselement::LayoutCanvasRenderingContextHelpers;

#[dom_struct]
pub(crate) struct GPUCanvasContext {
    reflector_: Reflector,
}

impl GPUCanvasContext {
    #[allow(dead_code)]
    fn new_inherited() -> Self {
        unimplemented!()
    }
}

impl GPUCanvasContextMethods<crate::DomTypeHolder> for GPUCanvasContext {
    /// <https://gpuweb.github.io/gpuweb/#dom-gpucanvascontext-canvas>
    fn Canvas(&self) -> UnionTypes::HTMLCanvasElementOrOffscreenCanvas {
        unimplemented!()
    }
}

impl LayoutCanvasRenderingContextHelpers for LayoutDom<'_, GPUCanvasContext> {
    fn canvas_data_source(self) -> Option<ImageKey> {
        unimplemented!()
    }
}