Files
hyperframes/packages
Vance Ingalls 60ae12a7e6 fix(producer): honor object-fit and object-position when blitting hdr images
Previously blitHdrImageLayer rendered the source PNG at its native
resolution, ignoring the CSS object-fit / object-position applied to the
<img> element. With cover or contain rules, the image appeared as a
small native-sized patch floating inside its layout box.

Resample the decoded rgb48le buffer to the element's layout dimensions
during the one-shot decode pass, applying object-fit semantics with a
bilinear resampler. The downstream affine blit then treats the source as
if it were already sized to the layout box, matching browser behavior.

- Extend ElementStackingInfo with objectFit / objectPosition captured
  from getComputedStyle for HDR replaced elements.
- Add resampleRgb48leObjectFit, normalizeObjectFit and helpers in
  alphaBlit (fill / cover / contain / none / scale-down with
  object-position support, opaque black slack fill).
- Cache object-fit info per HDR image id and resample once during
  pre-decode to keep per-frame cost a memcpy + blit.

Made-with: Cursor
2026-04-20 11:09:55 -07:00
..
2026-04-19 23:35:35 +00:00
2026-04-19 23:35:35 +00:00