pub struct MultiDirtyRectTracker { /* private fields */ }Expand description
Tracks the dirty area as a bounded set of rectangles, merging the ones that waste the least area when the set is full.
Implementations§
Source§impl MultiDirtyRectTracker
impl MultiDirtyRectTracker
pub fn new( platform_render: &dyn IPlatformRenderInterface, max_dirty_rects: i32, max_overhead: f64, ) -> Self
Sourcepub fn inflated_rects(&self) -> Ref<'_, [LtrbRect]>
pub fn inflated_rects(&self) -> Ref<'_, [LtrbRect]>
The dirty rectangles of the last finalized frame, inflated and clipped to the frame bounds.
Trait Implementations§
Source§impl IDirtyRectTracker for MultiDirtyRectTracker
impl IDirtyRectTracker for MultiDirtyRectTracker
Source§fn finalize_frame(&self, bounds: LtrbRect)
fn finalize_frame(&self, bounds: LtrbRect)
Post-processes the dirty rect area (e. g. to account for anti-aliasing)
Source§fn begin_draw(&self, ctx: &mut dyn IDrawingContextImpl)
fn begin_draw(&self, ctx: &mut dyn IDrawingContextImpl)
Pushes the dirty area as a clip onto
ctx. Read moreSource§fn end_draw(&self, ctx: &mut dyn IDrawingContextImpl)
fn end_draw(&self, ctx: &mut dyn IDrawingContextImpl)
Pops the clip pushed by
begin_draw.fn is_empty(&self) -> bool
fn intersects(&self, rect: LtrbRect) -> bool
fn initialize(&self, bounds: LtrbRect)
Source§fn visualize(&self, context: &mut dyn IDrawingContextImpl)
fn visualize(&self, context: &mut dyn IDrawingContextImpl)
Draws the dirty area in a random color (debug overlay).
fn combined_rect(&self) -> LtrbRect
Source§fn is_single_dirty_rect_tracker(&self) -> bool
fn is_single_dirty_rect_tracker(&self) -> bool
Whether the tracker is a
SingleDirtyRectTracker (the is test of
the render pass, which needs no per-visual test with one).Auto Trait Implementations§
impl !Freeze for MultiDirtyRectTracker
impl !RefUnwindSafe for MultiDirtyRectTracker
impl !Send for MultiDirtyRectTracker
impl !Sync for MultiDirtyRectTracker
impl !UnwindSafe for MultiDirtyRectTracker
impl Unpin for MultiDirtyRectTracker
impl UnsafeUnpin for MultiDirtyRectTracker
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more