[wpt-sync] Sync PR 45007 - Add naive implementation of `beginWebGPUAccess`.
Categories
(Core :: Graphics: Canvas2D, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox126 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 45007 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/45007
Details from upstream follow.
John Stiles <johnstiles@google.com> wrote:
Add naive implementation of
beginWebGPUAccess
.Explainer:
https://github.com/fserb/canvas2D/blob/master/spec/webgpu.mdThis API converts a canvas' currently-displayed image to a
GPUTexture which can be used by WebGPU. At present, the current
implementation uses Snapshot(), which always clones the image.
An ideal design would avoid this copy, but this gives us a
starting point to iterate from.We do not yet have any guards against continuing to use the
Canvas2D APIs after callingbeginWebGPUAccess
. This is safe
because we don't actually steal the existing texture away from
the canvas; it still has its own storage, distinct from the WebGPU
texture. OnceendWebGPUAccess
is implemented, it is expected
that this would clobber any canvas changes that might have
occurred during WebGPU access (as the canvas texture would be
replaced by the GPUTexture from WebGPU).Change-Id: Ied046431fbfdfff673ae61280317f8e0931ece7e
Bug: 41490345
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5289055
Reviewed-by: Austin Eng \<enga@chromium.org>
Reviewed-by: Jean-Philippe Gravel \<jpgravel@chromium.org>
Reviewed-by: Vasiliy Telezhnikov \<vasilyt@chromium.org>
Auto-Submit: John Stiles \<johnstiles@google.com>
Commit-Queue: John Stiles \<johnstiles@google.com>
Cr-Commit-Position: refs/heads/main@{#1275839}
Assignee | ||
Updated•11 months ago
|
Assignee | ||
Comment 1•11 months ago
|
||
Assignee | ||
Comment 2•11 months ago
|
||
Assignee | ||
Comment 3•11 months ago
|
||
Assignee | ||
Comment 5•11 months ago
|
||
Comment 6•11 months ago
|
||
bugherder |
Description
•