Commit 1dff13b
committed
gfx/d3d8: Cull text on the top side of the soft scissor too
The font path's whole-line scissor cull added in 5f23e85 only
checked the bottom side: skip when the baseline ly is at or below
the scissor's bottom edge. The top-side case was left out on the
assumption that entries scrolled above the scissor "don't occur in
practice." They do — scrolling Ozone's entry list far enough down
pushes the topmost entry's text up past the scissor's top edge,
where it bleeds into the header bar (the icons get correctly
clipped by gfx_display_d3d8_draw's geometry path, but the text
leaked through unchecked).
Add the symmetric ly < sy cull. Visible glyphs sit at or above
the baseline, so a baseline above sy means the whole line is
above sy and entirely outside the scissor.
Edge-aligned lines (baseline ~ sy or ~ sy2) still render in full;
partial overlap isn't clipped. Pixel-perfect glyph clipping would
need per-glyph bounding-box checks against the rect with UV remap
similar to what gfx_display_d3d8_draw does for quads, which isn't
worth the complexity for a fallback-quality backend. The
whole-line cull is enough to stop the visible overflow into both
of Ozone's header and footer regions.1 parent 45699e2 commit 1dff13b
1 file changed
Lines changed: 26 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1406 | 1406 | | |
1407 | 1407 | | |
1408 | 1408 | | |
1409 | | - | |
1410 | | - | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
1414 | | - | |
1415 | | - | |
1416 | | - | |
1417 | | - | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
1418 | 1432 | | |
1419 | 1433 | | |
1420 | | - | |
1421 | | - | |
1422 | | - | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
1423 | 1437 | | |
1424 | 1438 | | |
1425 | 1439 | | |
| |||
0 commit comments