Files
harfbuzz/test/api
Behdad EsfahbodandClaude Opus 4.8 f97d6bbb0d [gpu] Count ignored rectangle clips so their pop does not pop a real clip
The GPU paint encoder left push_clip_rectangle at the no-op default
while pop_clip unconditionally decremented clip_depth.  COLR emits a
rectangle push/pop pair around every PaintColrGlyph that has a ClipBox,
so that pop removed whatever glyph/path clip sat below it on the stack.
When such a PaintColrGlyph is nested inside a PaintGlyph, the sibling
layers encoded afterwards carried one clip outline too few, painting
ink outside the enclosing outline, or were dropped entirely when they
reached an emitter with clip_depth == 0.

Register a push_clip_rectangle callback that records the push in a
small per-depth counter (rect_clips[d] = rectangles pushed while
clip_depth was d).  pop_clip consumes a non-zero count at the current
depth first and only otherwise pops a real clip.  Rectangle clips are
still left unencoded, exactly as the v1 design notes state; the counter
only keeps the glyph/path clip depth balanced across the ignored pair.
This is correct for any LIFO push/pop order without allocation, and
changes nothing for paint trees without rectangle clips (the top-level
ClipBox in COLR::paint_glyph is already balanced).

Reported by Anthropic's OSS Scanner as ordinary bug ANT-2026-ZEL64M07.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-30 16:54:46 -06:00
..
2025-04-06 18:08:50 -06:00
2026-07-30 19:02:25 -06:00
2026-09-04 14:14:49 -06:00
2026-07-31 04:31:26 +03:00
2025-04-05 22:37:10 -06:00
2020-01-31 16:37:30 -05:00
2020-01-15 13:36:01 -08:00
2025-06-08 13:43:27 +03:00