Struct script::dom::webgpu::gpucanvascontext::GPUCanvasContext
source · #[repr(C)]pub struct GPUCanvasContext {
reflector_: Reflector,
channel: WebGPU,
canvas: HTMLCanvasElementOrOffscreenCanvas,
webrender_image: ImageKey,
context_id: WebGPUContextId,
configuration: RefCell<Option<GPUCanvasConfiguration>>,
texture_descriptor: RefCell<Option<GPUTextureDescriptor>>,
drawing_buffer: RefCell<DrawingBuffer>,
current_texture: MutNullableDom<GPUTexture>,
}
Fields§
§reflector_: Reflector
§channel: WebGPU
§canvas: HTMLCanvasElementOrOffscreenCanvas
§webrender_image: ImageKey
§context_id: WebGPUContextId
§configuration: RefCell<Option<GPUCanvasConfiguration>>
§texture_descriptor: RefCell<Option<GPUTextureDescriptor>>
§drawing_buffer: RefCell<DrawingBuffer>
§current_texture: MutNullableDom<GPUTexture>
Implementations§
source§impl GPUCanvasContext
impl GPUCanvasContext
fn __assert_parent_type(&self)
source§impl GPUCanvasContext
impl GPUCanvasContext
fn new_inherited( global: &GlobalScope, canvas: HTMLCanvasElementOrOffscreenCanvas, channel: WebGPU, ) -> Self
pub fn new( global: &GlobalScope, canvas: &HTMLCanvasElement, channel: WebGPU, ) -> Root<Dom<Self>>
source§impl GPUCanvasContext
impl GPUCanvasContext
sourcefn texture_descriptor_for_canvas(
&self,
configuration: &GPUCanvasConfiguration,
) -> GPUTextureDescriptor
fn texture_descriptor_for_canvas( &self, configuration: &GPUCanvasConfiguration, ) -> GPUTextureDescriptor
sourcefn expire_current_texture(&self)
fn expire_current_texture(&self)
source§impl GPUCanvasContext
impl GPUCanvasContext
fn layout_handle(&self) -> HTMLCanvasDataSource
fn send_swap_chain_present(&self, texture_id: WebGPUTexture)
fn size(&self) -> Size2D<u64>
source§impl GPUCanvasContext
impl GPUCanvasContext
pub(crate) fn context_id(&self) -> WebGPUContextId
pub(crate) fn mark_as_dirty(&self)
sourcepub(crate) fn update_rendering_of_webgpu_canvas(&self)
pub(crate) fn update_rendering_of_webgpu_canvas(&self)
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>, _: CanGc) -> 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::webgpu::gpucanvascontext::GPUCanvasContext>, script_runtime::CanGc) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::webgpu::gpucanvascontext::GPUCanvasContext>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>, _: CanGc) -> 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::webgpu::gpucanvascontext::GPUCanvasContext>, script_runtime::CanGc) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::webgpu::gpucanvascontext::GPUCanvasContext>>}
Function pointer to the general wrap function type
source§impl Drop for GPUCanvasContext
impl Drop for GPUCanvasContext
source§impl GPUCanvasContextMethods<DomTypeHolder> for GPUCanvasContext
impl GPUCanvasContextMethods<DomTypeHolder> 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§impl PartialEq for GPUCanvasContext
impl PartialEq for GPUCanvasContext
source§impl Traceable for GPUCanvasContext
impl Traceable for GPUCanvasContext
impl Eq for GPUCanvasContext
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. 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