41 bool is_full() const noexcept {
return full_; }
42 bool has_bounds() const noexcept {
return have_bounds_; }
48 bool is_bounded() const noexcept {
return !full_ && have_bounds_; }
53 bool have_bounds_ =
false;
62 if (root_rect.
width <= 0 || root_rect.
height <= 0) {
72 const float nx = std::min(bounds_.x, root_rect.
x);
73 const float ny = std::min(bounds_.y, root_rect.
y);
75 std::max(bounds_.right(), root_rect.
right()) - nx,
76 std::max(bounds_.bottom(), root_rect.
bottom()) - ny};
98 s.have_bounds_ = have_bounds_;
115 if (
s.have_bounds_)
mark(
s.bounds_);
120 bool have_bounds_ =
false;
One frame's damage, taken atomically out of a PendingDamage.
Definition pending_damage.hpp:39
Rect bounds() const noexcept
Definition pending_damage.hpp:43
bool is_bounded() const noexcept
True when this snapshot describes a clippable region — bounded damage with a real rect.
Definition pending_damage.hpp:48
bool has_bounds() const noexcept
Definition pending_damage.hpp:42
friend class PendingDamage
Definition pending_damage.hpp:51
bool is_full() const noexcept
Definition pending_damage.hpp:41
Accumulated repaint damage for one frame, in root/window coordinates.
Definition pending_damage.hpp:32
void mark_full()
Whole-surface repaint. Any structural change uses this.
Definition pending_damage.hpp:58
bool has_bounds() const
Definition pending_damage.hpp:80
void clear()
Called by the host once it has painted and submitted the frame.
Definition pending_damage.hpp:84
void restore(const Snapshot &s)
Put a taken snapshot back after a frame failed to reach its output.
Definition pending_damage.hpp:110
Snapshot take()
Read this frame's damage AND clear it, in one step.
Definition pending_damage.hpp:95
Rect bounds() const
Definition pending_damage.hpp:81
void mark(const Rect &root_rect)
Union a bounded region (root coords) into this frame's damage.
Definition pending_damage.hpp:61
bool is_full() const
Definition pending_damage.hpp:79
Hover-cursor tracking for platform window hosts.
Definition fwd.hpp:27
@ s
Definition input_events.hpp:41
Axis-aligned rectangle in continuous (float) coordinates.
Definition geometry.hpp:52
float x
Definition geometry.hpp:53
constexpr float right() const
Definition geometry.hpp:55
float height
Definition geometry.hpp:53
float width
Definition geometry.hpp:53
float y
Definition geometry.hpp:53
constexpr float bottom() const
Definition geometry.hpp:56