Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

offscreencanvas-sync.html hangs with buffering implementations #3639

Closed
kkinnunen-apple opened this issue Apr 10, 2024 · 1 comment
Closed
Assignees

Comments

@kkinnunen-apple
Copy link
Contributor

offscreencanvas-sync.html hangs with buffering implementations

Does not flush the fence sync

kkinnunen-apple added a commit to kkinnunen-apple/WebGL that referenced this issue Apr 10, 2024
KhronosGroup#3639)

Flush the commands after inserting fence sync. Otherwise it is not
guaranteed that the implementation processes the commands.

Remove the clear commands, their results are not used.
kkinnunen-apple added a commit to kkinnunen-apple/WebGL that referenced this issue Apr 10, 2024
…p#3639)

Flush the commands after inserting the fence sync. Otherwise it is not
guaranteed that the implementation processes the commands.

Remove the clear commands, their results are not used.
@kkinnunen-apple kkinnunen-apple self-assigned this Apr 10, 2024
webkit-commit-queue pushed a commit to kkinnunen-apple/WebKit that referenced this issue Apr 10, 2024
https://bugs.webkit.org/show_bug.cgi?id=272320
rdar://126069375

Reviewed by Matt Woodrow.

Upon constructing OffscreenCanvas from a detached OffscreenCanvas,
the OffscreenCanvas::create() function would post a main thread task
to populate the placeholder data (pipe and weak ptr to the placeholder).

If the OffscreenCanvas would be then detached and sent to a nested worker
before this main thread task would run, the detached OffscreenCanvas would
not have the placeholder data at all. This would cause failure to send
frames to the placeholder.

Fix by populating the placeholder data during transferControlToOffscreen(),
e.g. when creating the initial main thread OffscreenCanvas.

* LayoutTests/webgl/resources/webgl_test_files/conformance2/offscreencanvas/offscreencanvas-sync.html:
Fix the test to flush the offscreen canvas context after inserting the fence.
KhronosGroup/WebGL#3639

* LayoutTests/fast/canvas/offscreen-nested-worker-serialization-expected.html: Added.
* LayoutTests/fast/canvas/offscreen-nested-worker-serialization.html: Added.
* LayoutTests/fast/canvas/resources/offscreen-nested-worker.js: Added.
(onmessage):
* LayoutTests/fast/canvas/resources/offscreen-worker.js: Added.
(onmessage):
* Source/WebCore/html/OffscreenCanvas.cpp:
(WebCore::OffscreenCanvasPlaceholderData::create):
(WebCore::OffscreenCanvasPlaceholderData::placeholder const):
(WebCore::OffscreenCanvasPlaceholderData::pipeSource const):
(WebCore::OffscreenCanvasPlaceholderData::OffscreenCanvasPlaceholderData):
(WebCore::DetachedOffscreenCanvas::DetachedOffscreenCanvas):
(WebCore::DetachedOffscreenCanvas::takePlaceholderData):
(WebCore::OffscreenCanvas::create):
(WebCore::OffscreenCanvas::OffscreenCanvas):
(WebCore::OffscreenCanvas::detach):
(WebCore::OffscreenCanvas::commitToPlaceholderCanvas):
(WebCore::OffscreenCanvas::scheduleCommitToPlaceholderCanvas):
(WebCore::DetachedOffscreenCanvas::takePlaceholderCanvas): Deleted.
(WebCore::OffscreenCanvas::setPlaceholderCanvas): Deleted.
(WebCore::OffscreenCanvas::pushBufferToPlaceholder): Deleted.
* Source/WebCore/html/OffscreenCanvas.h:

Canonical link: https://commits.webkit.org/277328@main
@kenrussell
Copy link
Member

If I was wrong and this wasn't fixed by #3640 , please reopen - thanks.

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

No branches or pull requests

2 participants