Skip to content

Fix copyElementImageToTexture calls in current Chromium - #7

Open
postmelee wants to merge 1 commit into
AndrewPrifer:masterfrom
postmelee:codex/fix-element-image-copy-signature
Open

Fix copyElementImageToTexture calls in current Chromium#7
postmelee wants to merge 1 commit into
AndrewPrifer:masterfrom
postmelee:codex/fix-element-image-copy-signature

Conversation

@postmelee

Copy link
Copy Markdown

Summary

  • update the experimental GPUQueue.copyElementImageToTexture extension to use Chromium's dictionary-based source and destination arguments
  • share the call shape between scene HTML textures and glass content atlas textures
  • add a regression test for the WebGPU call arguments and a patch changeset

Root cause

DomContentSync still used the earlier four-argument form:

queue.copyElementImageToTexture(element, width, height, { texture })

Current Chromium interprets the first argument as a GPUCopyElementImageSource dictionary. Passing the element directly therefore throws:

TypeError: Failed to execute 'copyElementImageToTexture' on 'GPUQueue':
Failed to read the 'source' property from 'GPUCopyElementImageSource':
Required member is undefined.

The renderer continued drawing the WebGPU glass geometry, but DOM-backed backgrounds, icons, and text were left black. The updated call matches the Chrome 150 implementation:

queue.copyElementImageToTexture(
  { source: element },
  {
    destination: { texture },
    width,
    height,
  },
)

Impact

DOM content renders again when Liquid DOM runs in current Chromium with WebGPU and chrome://flags/#canvas-draw-element enabled.

Validation

  • pnpm --filter @liquid-dom/core test — 6 files and 32 tests passed
  • pnpm --filter @liquid-dom/core build
  • pnpm release:check
  • manually verified scene HTML and glass-attached HTML in Chrome 150.0.7871.115

@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

@postmelee is attempting to deploy a commit to the Andrew Peter Prifer's projects Team on Vercel.

A member of the Team first needs to authorize it.

@postmelee
postmelee marked this pull request as ready for review July 16, 2026 16:56
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