Ω-W1-T3 review fixes: skip meter invalidate when covered; push fast-path predicates into core

Fixes the critical finding — Browse/curve-popup no longer trigger 60 Hz
whole-client repaints when the meter is invisible. Pushes the fast-path and
self-containment geometry into master_meter with tests; batches the four minor
findings.
This commit is contained in:
2026-08-03 13:31:50 -04:00
parent 4320bfdb08
commit dd067a192e
9 changed files with 102 additions and 21 deletions
+5 -6
View File
@@ -51,11 +51,9 @@ void ReaSamplerEditor::paint(HDC hdc, const RECT& dirty) {
// A meter frame's dirty rect lies wholly inside the bar field, and nothing else is drawn
// there — so the field is all that needs redrawing, and the rest of the face is still in the
// back buffer from the last full compose. Decided GEOMETRICALLY rather than by a flag,
// because Windows coalesces a meter invalidate with any other pending one into a single
// union rect: a flag would then paint a meter frame over a face that had really changed.
const Rect& mf = meterRects_.field;
if (!mf.empty() && dx >= mf.x && dy >= mf.y && dr <= mf.right() && db <= mf.bottom()) {
// back buffer from the last full compose. Decided GEOMETRICALLY rather than by a flag — see
// meterFastPathEligible (master_meter) for why.
if (meterFastPathEligible(meterRects_, Rect::ltrb(dx, dy, dr, db))) {
paintMeterField(bmp);
} else {
// Repopulated by paintDeck when the meter is on screen; left empty by the empty state.
@@ -83,7 +81,8 @@ void ReaSamplerEditor::paint(HDC hdc, const RECT& dirty) {
}
// A sheet layered over the face covers the meter, so the fast path must not paint
// through it — dropping the rect routes the next meter tick down this path instead.
// through it even if something else invalidates a rect that happens to match the
// stale field bounds — invalidateMeter itself already skips while covered (see there).
if (view_ == View::kBrowse || curvePopup_ != CurveTarget::kNone) meterRects_ = {};
}