Files
harfbuzz/util/gpu
Behdad EsfahbodandClaude Opus 4.6 d35cdadd2a [util/gpu/web] Ignore 0x0 resizeCanvas calls; keep default buffer
The iframe-hosted case ran resizeCanvas() at script parse
time, before the iframe had laid out its canvas, which
installed a 0x0 drawing buffer.  getContext('webgl2')
grabbed that 0x0 context and every subsequent setup (atlas,
viewport, swap chain) was frozen at 0x0 even when
ResizeObserver later re-ran resizeCanvas with real dims --
the existing context doesn't resize with the canvas
attribute.

Bail out of resizeCanvas when either dimension is 0, so the
canvas keeps its intrinsic default (300x150) until a real
layout arrives.  getContext then grabs a non-degenerate
context, and the first ResizeObserver callback bumps it up
to the actual iframe-sized buffer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 12:00:17 -06:00
..
2026-03-26 18:30:13 -06:00