Struct script::dom::gpucanvascontext::GPUCanvasContext
source · #[repr(C)]pub struct GPUCanvasContext {
reflector_: Reflector,
channel: WebGPU,
canvas: HTMLCanvasElementOrOffscreenCanvas,
webrender_image: Cell<Option<ImageKey>>,
context_id: WebGPUContextId,
texture: MutNullableDom<GPUTexture>,
}
Fields§
§reflector_: Reflector
§channel: WebGPU
§canvas: HTMLCanvasElementOrOffscreenCanvas
§webrender_image: Cell<Option<ImageKey>>
§context_id: WebGPUContextId
§texture: MutNullableDom<GPUTexture>
Implementations§
source§impl GPUCanvasContext
impl GPUCanvasContext
fn __assert_parent_type(&self)
source§impl GPUCanvasContext
impl GPUCanvasContext
fn new_inherited( canvas: HTMLCanvasElementOrOffscreenCanvas, channel: WebGPU ) -> Self
pub fn new( global: &GlobalScope, canvas: &HTMLCanvasElement, channel: WebGPU ) -> Root<Dom<Self>>
source§impl GPUCanvasContext
impl GPUCanvasContext
fn layout_handle(&self) -> HTMLCanvasDataSource
pub fn send_swap_chain_present(&self)
pub fn context_id(&self) -> WebGPUContextId
pub fn texture_id(&self) -> Option<WebGPUTexture>
pub fn mark_as_dirty(&self)
fn size(&self) -> Size2D<u64>
Trait Implementations§
source§impl DomObject for GPUCanvasContext
impl DomObject for GPUCanvasContext
source§impl DomObjectWrap for GPUCanvasContext
impl DomObjectWrap for GPUCanvasContext
source§const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::WebGPUBinding::GPUCanvasContext_Binding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::gpucanvascontext::GPUCanvasContext>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::gpucanvascontext::GPUCanvasContext>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::WebGPUBinding::GPUCanvasContext_Binding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::gpucanvascontext::GPUCanvasContext>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::gpucanvascontext::GPUCanvasContext>>}
Function pointer to the general wrap function type
source§impl Drop for GPUCanvasContext
impl Drop for GPUCanvasContext
source§impl GPUCanvasContextMethods for GPUCanvasContext
impl GPUCanvasContextMethods for GPUCanvasContext
source§impl HasParent for GPUCanvasContext
impl HasParent for GPUCanvasContext
source§impl IDLInterface for GPUCanvasContext
impl IDLInterface for GPUCanvasContext
source§impl MallocSizeOf for GPUCanvasContext
impl MallocSizeOf for GPUCanvasContext
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl MutDomObject for GPUCanvasContext
impl MutDomObject for GPUCanvasContext
source§unsafe fn init_reflector(&self, obj: *mut JSObject)
unsafe fn init_reflector(&self, obj: *mut JSObject)
Initializes the Reflector
source§impl PartialEq for GPUCanvasContext
impl PartialEq for GPUCanvasContext
source§fn eq(&self, other: &GPUCanvasContext) -> bool
fn eq(&self, other: &GPUCanvasContext) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.Auto Trait Implementations§
impl !Freeze for GPUCanvasContext
impl !RefUnwindSafe for GPUCanvasContext
impl !Send for GPUCanvasContext
impl !Sync for GPUCanvasContext
impl Unpin for GPUCanvasContext
impl !UnwindSafe for GPUCanvasContext
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert