Closed Bug 2080570 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 63517 - [html-in-canvas] Keep MailboxTextureBacking single-threaded

Categories

(Core :: Graphics: Canvas2D, task, P4)

task

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 63517 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/63517
Details from upstream follow.

Philip Rogers <pdr@chromium.org> wrote:

[html-in-canvas] Keep MailboxTextureBacking single-threaded

In nested html-in-canvas scenarios, GetCanvasSnapshot recorded a nested
canvas snapshot without first making it unaccelerated. When transferred
to worker threads via ElementImage, a single-threaded
MailboxTextureBacking object bound to the main thread's GPU context
could be used on worker threads, causing multiple threads to
simultaneously use the main thread's unsynchronized
RasterContextProvider. This patch ensures GetCanvasSnapshot only draws
an unaccelerated snapshot, similar to the non-nested case in
HTMLCanvasElement::PaintInternal.

To harden against this issue, the existing MailboxTextureBacking thread
checks have been converted to CHECKS, and have been expanded.

Fixed: 569129173
Change-Id: Ide09e9375da36ba55bf3dca69d5eb1d2811112c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8549355
Reviewed-by: Stefan Zager \<szager@chromium.org>
Commit-Queue: Stefan Zager \<szager@chromium.org>
Auto-Submit: Philip Rogers \<pdr@chromium.org>
Commit-Queue: Philip Rogers \<pdr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1716006}

Component: web-platform-tests → Graphics: Canvas2D
Product: Testing → Core

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 1 subtests

Status Summary

Firefox

OK : 1
FAIL : 1

Chrome

TIMEOUT: 1
ERROR : 1

Safari

OK : 1
FAIL : 1

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0590fdc3ac0f https://hg.mozilla.org/integration/autoland/rev/1ea9c9a0b4a5 [wpt PR 63517] - [html-in-canvas] Keep MailboxTextureBacking single-threaded, a=testonly
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
You need to log in before you can comment on or make changes to this bug.