Skip to content

[2/2] fix: draw html5 frames on a software canvas so Firefox keeps their gradients - #280

Merged
dazzatronus merged 1 commit into
derk/html5-safari-embedded-imagesfrom
derk/html5-firefox-gradients
Oct 30, 2026
Merged

dazzatronus merged 1 commit into
derk/html5-safari-embedded-imagesfrom
derk/html5-firefox-gradients

Conversation

@dazzatronus

@dazzatronus dazzatronus commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Firefox's GPU-accelerated 2D canvas draws some CSS gradients in an html5 frame as a solid fill. On one edit, a 28 px repeating-linear-gradient hatch came out flat grey on 44 of 374 frames. Firefox's software canvas draws them correctly. willReadFrequently: true asks for a canvas that reads back cheaply, which in Firefox means software, so the canvas each frame is drawn on now requests it.

It cost nothing measurable. Firefox and Chrome baked in the same time with and without it, and Safari drew frames in about 25 ms either way. The drawing version goes to 2, so bakes cached with flat gradients are redrawn.

Verify: npm run verify:ci. Then, in a windowed Firefox, bake an html5 clip with a fine repeating-linear-gradient: the frames show its stripes. Headless Firefox draws in software unless its GPU canvas is forced on, so the bug doesn't show there.

Merge after #279. Its drawing version is what this raises.

PR Adds Why separate
#279 Embedded images decoded before Safari draws a frame; bake drawing version Safari-only cause, revertible alone
this PR #280 Frames drawn on a software canvas; drawing version 2 Firefox-only cause; raises #279's version

Merge bottom-up: #280 targets #279's branch, and moves to main once #279 lands.

@dazzatronus
dazzatronus force-pushed the derk/html5-firefox-gradients branch from 67ec760 to 56dacaa Compare October 30, 2026 12:36
@dazzatronus
dazzatronus merged commit d508db8 into main Oct 30, 2026
1 check passed
github-actions Bot pushed a commit that referenced this pull request Oct 30, 2026
## [2.30.1](v2.30.0...v2.30.1) (2026-10-30)

### Bug Fixes

* draw clip filters in the preview as the render applies them ([#265](#265)) ([ac02f9b](ac02f9b))
* draw html5 frames on a software canvas so Firefox keeps their gradients ([#280](#280)) ([d508db8](d508db8))
* **export:** draw export frames into one stencil target so Firefox keeps masked content ([#278](#278)) ([f431c6b](f431c6b))
* **export:** tag browser exports as limited range so Safari's whites stay white ([#277](#277)) ([c6150eb](c6150eb))
* keep a frame's embedded images when Safari draws an html5 clip ([#279](#279)) ([5154007](5154007))
* keep baking html5 clips while their tab is in the background ([#281](#281)) ([e1fa158](e1fa158))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.30.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant