Tracks rectangular regions that need repainting.
More...
#include <dirty_tracker.hpp>
|
| void | invalidate (const Rect &rect) |
| | Mark a rectangular region as needing repaint.
|
| void | invalidate (float x, float y, float w, float h) |
| | Mark a rectangular region as needing repaint (convenience overload).
|
| void | invalidate_all () |
| | Mark the entire viewport as dirty (forces full repaint).
|
| bool | is_dirty () const |
| | Returns true if any region needs repainting.
|
| bool | needs_full_repaint () const |
| | Returns true if the entire viewport needs repainting.
|
| const std::vector< Rect > & | dirty_rects () const |
| | Get the list of dirty rectangles (empty if full repaint).
|
| void | clear () |
| | Clear all dirty state after a frame has been painted.
|
| Rect | bounds () const |
| | Get the bounding rect of all dirty regions (for partial repaints).
|
| void | set_viewport (float width, float height, float full_repaint_threshold=0.6f) |
| | Set the viewport size.
|
| void | set_debug_overlay (bool enabled) |
| | Enable/disable debug overlay (draws dirty regions with colored flash).
|
| bool | debug_overlay () const |
| uint64_t | frame_count () const |
| | Frame counter for multi-frame history tracking.
|
Tracks rectangular regions that need repainting.
Audio plugin UIs have large static areas (panels, labels) with small dynamic regions (meters, waveforms). Only repainting dirty regions is a major performance win.
◆ bounds()
| Rect pulp::render::DirtyTracker::bounds |
( |
| ) |
const |
|
inline |
Get the bounding rect of all dirty regions (for partial repaints).
◆ clear()
| void pulp::render::DirtyTracker::clear |
( |
| ) |
|
|
inline |
Clear all dirty state after a frame has been painted.
Call this after submitting the frame to the GPU.
◆ debug_overlay()
| bool pulp::render::DirtyTracker::debug_overlay |
( |
| ) |
const |
|
inline |
◆ dirty_rects()
| const std::vector< Rect > & pulp::render::DirtyTracker::dirty_rects |
( |
| ) |
const |
|
inline |
Get the list of dirty rectangles (empty if full repaint).
◆ frame_count()
| uint64_t pulp::render::DirtyTracker::frame_count |
( |
| ) |
const |
|
inline |
Frame counter for multi-frame history tracking.
◆ invalidate() [1/2]
| void pulp::render::DirtyTracker::invalidate |
( |
const Rect & | rect | ) |
|
|
inline |
Mark a rectangular region as needing repaint.
◆ invalidate() [2/2]
| void pulp::render::DirtyTracker::invalidate |
( |
float | x, |
|
|
float | y, |
|
|
float | w, |
|
|
float | h ) |
|
inline |
Mark a rectangular region as needing repaint (convenience overload).
◆ invalidate_all()
| void pulp::render::DirtyTracker::invalidate_all |
( |
| ) |
|
|
inline |
Mark the entire viewport as dirty (forces full repaint).
◆ is_dirty()
| bool pulp::render::DirtyTracker::is_dirty |
( |
| ) |
const |
|
inline |
Returns true if any region needs repainting.
◆ needs_full_repaint()
| bool pulp::render::DirtyTracker::needs_full_repaint |
( |
| ) |
const |
|
inline |
Returns true if the entire viewport needs repainting.
◆ set_debug_overlay()
| void pulp::render::DirtyTracker::set_debug_overlay |
( |
bool | enabled | ) |
|
|
inline |
Enable/disable debug overlay (draws dirty regions with colored flash).
◆ set_viewport()
| void pulp::render::DirtyTracker::set_viewport |
( |
float | width, |
|
|
float | height, |
|
|
float | full_repaint_threshold = 0.6f ) |
|
inline |
Set the viewport size.
If dirty area exceeds this percentage of the viewport, the tracker switches to full repaint mode.
The documentation for this class was generated from the following file: