Skip to content

Upgrade to @solidtv/renderer 1.9 - #58

Merged
chiefcll merged 1 commit into
mainfrom
chore/renderer-1.9
Sep 8, 2026
Merged

Upgrade to @solidtv/renderer 1.9#58
chiefcll merged 1 commit into
mainfrom
chore/renderer-1.9

Conversation

@chiefcll

@chiefcll chiefcll commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Moves the framework from @solidtv/renderer 1.6.3 to 1.9.0 and brings the docs in line.

Renderer 1.8 was a breaking release — render-to-texture, the per-node boundsMargin prop, the inBounds/outOfBounds events and container autosize were all removed — and 1.9 dropped the __calculateFps__ build gate.

Breaking changes for apps

Removed in the renderer Effect here
rtt prop, RenderTexture, TextureType.renderToTexture Dropped from ElementNode, the DOM renderer, and both primitives that used it. No replacement exists.
per-node boundsMargin Removed; bounds math reads the stage setting only. Its default moved from 0 to 200.
boundsMargin tuple form normalizeBoundsMargin returns a scalar, mirroring the WebGL renderer's largest-edge coercion and warning.
inBounds / outOfBounds events Replaced by inViewport / outOfViewport, typed as NodeViewportPayload.
renderOnlyInViewport Gone; its true behavior is unconditional.
container autosize Now texture-only, and a no-op on <text>.

The createTag primitive is removed. It existed only to build RTT textures and cannot work on 1.9.

Two visible behavior changes

RTT has no replacement in 1.9, so removal was the only option, but both of these are user-visible and worth a look during review:

  • FadeInOut set rtt = true before its fade-out. Alpha now composites per node, so overlapping children can show seams through the fade.
  • Marquee drew its two scrolling text copies through a texture; they render directly now.

autosize needed no code change — solid only ever used it on the texture-load path (_layoutOnLoad), which is exactly the mode that survived.

Also included

Config.rendererOptions was typed as a union of the WebGL and DOM settings types, so every member the two did not share was invisible — callers had to write 'x' in options ? options.x : undefined. It is now an intersection: the four overlapping members have identical types and all members are optional, so it is strictly more permissive than the union and no existing assignment breaks. This also collapses the 'inspector' in Config.rendererOptions guard in elementNode.ts.

Docs

  • New Upgrading to Renderer 1.9 guide, linked from the sidebar next to the 2.x→3.0 migration page.
  • solidtv_renderer.md rewritten: five surviving build flags rather than seven, the "undefined ≠ default" tree-shaking point, and a removed-flags table. Note __dirtyQuadBuffer__ also went away, in 1.8.3.
  • Corrected defaults throughout: boundsMargin 0→200, numImageWorkers 2→1 (and clamped), quadBufferSize 1310720→1048576, plus new targetFPS (defaults to 60) and textLayoutCacheSize entries.
  • events.md, styling.md, images.md, basics.md and fpscounter.md updated for the event rename, the rtt removal, texture-only autosize, and the reworked fpsUpdate payload.

Verification

npm run tsc, npm test (174/174), npm run lint (0 errors) and npm run build all pass.

Left alone

  • Grid.tsx passes strictBounds={false}, which is dead — that prop is absent from 1.6.3 too, so it predates this upgrade.
  • Renderer 1.8 widened src to accept Blob | ImageData. That is a new capability rather than a migration, so it is not plumbed through; the DOM renderer's image path is guarded on typeof src === 'string'.

🤖 Generated with Claude Code

Renderer 1.8 was a breaking release: render-to-texture, the per-node
boundsMargin prop, the inBounds/outOfBounds events and container autosize
were all removed, and 1.9 dropped the __calculateFps__ build gate. Move the
framework onto 1.9 and bring the docs in line.

Code:

- Drop `rtt` from ElementNode's prop list, its color default, and the DOM
  renderer's props, accessors and texture-type switch. RTT has no
  replacement, so FadeInOut (which flattened its subtree before fading out)
  and Marquee (which drew its scrolling copies through a texture) now
  render directly. Both are visible behavior changes.
- Remove the per-node `boundsMargin` prop from the DOM renderer and make
  `normalizeBoundsMargin` return a scalar, mirroring the WebGL renderer's
  largest-edge coercion and warning for the dropped tuple form.
- Replace the `inBounds`/`outOfBounds` node events with
  `inViewport`/`outOfViewport`, typed as `NodeViewportPayload`, and emit
  them from the DOM renderer with the same semantics as CoreNode.
- Guard the DOM renderer's image path on `typeof src === 'string'` now that
  the renderer accepts `Blob | ImageData` sources it cannot paint.
- Remove the createTag primitive and its docs. It existed only to build RTT
  textures and cannot work on 1.9.

`autosize` needed no change: solid only ever used it on the texture-load
path, which is the mode that survived.

Also fixes Config.rendererOptions, which was a union of the WebGL and DOM
settings types and so hid every member the two did not share. It is now an
intersection, which drops the `'inspector' in ...` narrowing dance and lets
callers read `devicePhysicalPixelRatio` directly.

Docs: new upgrade guide, rewritten build-flag article (five surviving
flags, not seven), and corrected defaults throughout — boundsMargin 0 -> 200,
numImageWorkers 2 -> 1, quadBufferSize 1310720 -> 1048576, targetFPS now
capped at 60.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chiefcll
chiefcll merged commit 3122185 into main Sep 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant