Say the window when the window is why a drawing was refused
`AxisHolds` is four contracts, and `diag::outside` counted three: a refusal because this window is outside the range the drawing was made for bumped "reuse outside: a rel base". The two are different questions -- a window range is pixels, a rel base pin is a window-unit length that an unchanged window can still change -- so the rig answered "why did that redraw?" with the wrong one for every resize.
This commit is contained in:
1 parent
02048eab77
commit
9b4cc329ce
1 file changed
+8
-5
@@ -72,6 +72,7 @@ labelled! {
|
||||
TextBreaks = "text line breaks",
|
||||
GlyphPlacements = "glyph placements",
|
||||
OutsidePinnedLen = "reuse outside: the length it was pinned to",
|
||||
OutsideWindow = "reuse outside: this window",
|
||||
OutsideRelBase = "reuse outside: a rel base",
|
||||
OutsideRegion = "reuse outside: a region length",
|
||||
}
|
||||
@@ -352,7 +353,7 @@ pub(crate) fn reuse(id: WidgetId, outcome: ReuseOutcome) {
|
||||
}
|
||||
|
||||
/// A drawing that cannot be reused because the box on offer is outside what
|
||||
/// it holds for, and which of the three contracts said so. They overlap: a
|
||||
/// it holds for, and which of the four contracts said so. They overlap: a
|
||||
/// drawing can be outside two of them at once, and counting each is what
|
||||
/// says where a rel base redrawing more than it should is coming from.
|
||||
pub(crate) fn outside(
|
||||
@@ -369,10 +370,12 @@ pub(crate) fn outside(
|
||||
if holds.region_len.is_some_and(|pinned| pinned != len) {
|
||||
bump(Counter::OutsidePinnedLen);
|
||||
}
|
||||
if !holds.window.contains(window)
|
||||
|| holds
|
||||
.rel_base
|
||||
.is_some_and(|pinned| pinned != rel_base[axis])
|
||||
if !holds.window.contains(window) {
|
||||
bump(Counter::OutsideWindow);
|
||||
}
|
||||
if holds
|
||||
.rel_base
|
||||
.is_some_and(|pinned| pinned != rel_base[axis])
|
||||
{
|
||||
bump(Counter::OutsideRelBase);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user