Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 41096f3920bd4eaf1cfd4c9e1217b51955305ce1
      
https://github.com/WebKit/WebKit/commit/41096f3920bd4eaf1cfd4c9e1217b51955305ce1
  Author: Kimmo Kinnunen <[email protected]>
  Date:   2024-04-10 (Wed, 10 Apr 2024)

  Changed paths:
    M LayoutTests/TestExpectations
    A 
LayoutTests/fast/canvas/offscreen-nested-worker-serialization-expected.html
    A LayoutTests/fast/canvas/offscreen-nested-worker-serialization.html
    A LayoutTests/fast/canvas/resources/offscreen-nested-worker.js
    A LayoutTests/fast/canvas/resources/offscreen-worker.js
    M 
LayoutTests/webgl/resources/webgl_test_files/conformance2/offscreencanvas/offscreencanvas-sync.html
    M Source/WebCore/html/OffscreenCanvas.cpp
    M Source/WebCore/html/OffscreenCanvas.h

  Log Message:
  -----------
  OffscreenCanvas fails to render to placeholder with nested workers
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.
https://github.com/KhronosGroup/WebGL/issues/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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to