pub struct ShowcaseWebDualCanvasCoordinator { /* private fields */ }Expand description
Stacked dual-canvas handoff controller guaranteeing independent <canvas> targets and honest SubmissionProxy telemetry.
Implementations§
Source§impl ShowcaseWebDualCanvasCoordinator
Independent-canvas pre-warming, atomic frame-boundary handoff, and proxy telemetry methods for ShowcaseWebDualCanvasCoordinator.
impl ShowcaseWebDualCanvasCoordinator
Independent-canvas pre-warming, atomic frame-boundary handoff, and proxy telemetry methods for ShowcaseWebDualCanvasCoordinator.
Sourcepub fn with_initial_path(
initial_path: ShowcaseWebPresentationPath,
width: u32,
height: u32,
) -> Self
pub fn with_initial_path( initial_path: ShowcaseWebPresentationPath, width: u32, height: u32, ) -> Self
Sourcepub fn standby_slot(&self) -> Option<ShowcaseWebCanvasSlot>
pub fn standby_slot(&self) -> Option<ShowcaseWebCanvasSlot>
Returns the currently pending hidden standby <canvas> slot, if any.
§Returns
Option<ShowcaseWebCanvasSlot>- Pending hidden standby slot.
Sourcepub fn begin_switch(
&mut self,
target_path: ShowcaseWebPresentationPath,
width: u32,
height: u32,
) -> bool
pub fn begin_switch( &mut self, target_path: ShowcaseWebPresentationPath, width: u32, height: u32, ) -> bool
Begins switching to target_path, allocating an independent hidden sibling <canvas> whenever switching context families (WebGl2 <-> Canvas2d).
§Arguments
ShowcaseWebPresentationPath- Candidate presentation path.u32- Target physical width in pixels.u32- Target physical height in pixels.
§Returns
bool-truewhen an independent hidden standby<canvas>was created;falsewhen switched in-place within the same context family.
Sourcepub fn mark_standby_ready(
&mut self,
width: u32,
height: u32,
scene_version: u64,
) -> bool
pub fn mark_standby_ready( &mut self, width: u32, height: u32, scene_version: u64, ) -> bool
Marks the hidden standby <canvas> as pre-warmed and ready for atomic swap at (width, height, scene_version).
§Arguments
u32- Rendered candidate physical width.u32- Rendered candidate physical height.u64- Rendered candidate scene revision.
§Returns
bool-trueif a standby slot was present and marked ready.
Sourcepub fn commit_at_frame_boundary(
&mut self,
expected_width: u32,
expected_height: u32,
expected_scene_version: u64,
) -> bool
pub fn commit_at_frame_boundary( &mut self, expected_width: u32, expected_height: u32, expected_scene_version: u64, ) -> bool
Atomically swaps visibility and z_index at a frame boundary once the standby <canvas> matches (expected_width, expected_height, expected_scene_version), retiring the old canvas only after commit.
§Arguments
u32- Expected physical width in pixels.u32- Expected physical height in pixels.u64- Expected scene revision.
§Returns
bool-truewhen swap committed;falsewhen standby was missing or stale (aborting handoff and keeping old canvas active).
Sourcepub fn abort_switch(&mut self)
pub fn abort_switch(&mut self)
Aborts any pending standby handoff without disturbing the visible active <canvas>.
Sourcepub fn record_raf_proxy_tick(&mut self, upload_bytes: u64)
pub fn record_raf_proxy_tick(&mut self, upload_bytes: u64)
Records a browser requestAnimationFrame callback strictly as ShowcaseWebTimingSource::SubmissionProxy.
§Arguments
u64- Framebuffer bytes uploaded on this tick (0forGpuDirect).
Source§impl ShowcaseWebDualCanvasCoordinator
impl ShowcaseWebDualCanvasCoordinator
pub fn get_active(&self) -> ShowcaseWebCanvasSlot
pub fn get_mut_active(&mut self) -> &mut ShowcaseWebCanvasSlot
pub fn set_active(&mut self, val: ShowcaseWebCanvasSlot) -> &mut Self
pub fn get_mut_standby(&mut self) -> &mut Option<ShowcaseWebCanvasSlot>
pub fn set_standby(&mut self, val: Option<ShowcaseWebCanvasSlot>) -> &mut Self
pub fn get_cpu_mirror_active(&self) -> bool
pub fn get_mut_cpu_mirror_active(&mut self) -> &mut bool
pub fn set_cpu_mirror_active(&mut self, val: bool) -> &mut Self
pub fn get_timing_source(&self) -> ShowcaseWebTimingSource
pub fn get_mut_timing_source(&mut self) -> &mut ShowcaseWebTimingSource
pub fn set_timing_source(&mut self, val: ShowcaseWebTimingSource) -> &mut Self
pub fn get_next_canvas_id(&self) -> u64
pub fn get_mut_next_canvas_id(&mut self) -> &mut u64
pub fn set_next_canvas_id(&mut self, val: u64) -> &mut Self
pub fn get_completed_swaps(&self) -> u64
pub fn get_mut_completed_swaps(&mut self) -> &mut u64
pub fn set_completed_swaps(&mut self, val: u64) -> &mut Self
pub fn get_aborted_swaps(&self) -> u64
pub fn get_mut_aborted_swaps(&mut self) -> &mut u64
pub fn set_aborted_swaps(&mut self, val: u64) -> &mut Self
pub fn get_raf_proxy_ticks(&self) -> u64
pub fn get_mut_raf_proxy_ticks(&mut self) -> &mut u64
pub fn set_raf_proxy_ticks(&mut self, val: u64) -> &mut Self
pub fn get_last_upload_bytes(&self) -> u64
pub fn get_mut_last_upload_bytes(&mut self) -> &mut u64
pub fn set_last_upload_bytes(&mut self, val: u64) -> &mut Self
pub fn get_retired_canvas_ids(&self) -> &Vec<u64>
pub fn get_mut_retired_canvas_ids(&mut self) -> &mut Vec<u64>
pub fn set_retired_canvas_ids(&mut self, val: Vec<u64>) -> &mut Self
Trait Implementations§
Source§impl Default for ShowcaseWebDualCanvasCoordinator
Default initialization for ShowcaseWebDualCanvasCoordinator starting on WebGL2 GpuUpload.
impl Default for ShowcaseWebDualCanvasCoordinator
Default initialization for ShowcaseWebDualCanvasCoordinator starting on WebGL2 GpuUpload.
impl Eq for ShowcaseWebDualCanvasCoordinator
impl StructuralPartialEq for ShowcaseWebDualCanvasCoordinator
Auto Trait Implementations§
impl Forget for ShowcaseWebDualCanvasCoordinator
impl Freeze for ShowcaseWebDualCanvasCoordinator
impl Move for ShowcaseWebDualCanvasCoordinator
impl RefUnwindSafe for ShowcaseWebDualCanvasCoordinator
impl Send for ShowcaseWebDualCanvasCoordinatorwhere
RawVecInner: Send,
impl Sync for ShowcaseWebDualCanvasCoordinatorwhere
RawVecInner: Sync,
impl Unpin for ShowcaseWebDualCanvasCoordinator
impl UnsafeUnpin for ShowcaseWebDualCanvasCoordinator
impl UnwindSafe for ShowcaseWebDualCanvasCoordinatorwhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
key and return true if they are equal.