[webkit-changes] [WebKit/WebKit] 756e76: [GTK][WPE][Skia] Allow cross-thread transfer of ac...
Pawel Lampe
noreply at github.com
Thu Dec 5 07:16:00 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 756e76506075a07f145e541a5345bef05b432e3f
https://github.com/WebKit/WebKit/commit/756e76506075a07f145e541a5345bef05b432e3f
Author: Pawel Lampe <plampe at igalia.com>
Date: 2024-12-05 (Thu, 05 Dec 2024)
Changed paths:
M Source/WebCore/bindings/js/SerializedScriptValue.cpp
M Source/WebCore/html/ImageBitmap.cpp
M Source/WebCore/html/ImageBitmap.h
M Source/WebCore/platform/graphics/ImageBuffer.cpp
M Source/WebCore/platform/graphics/ImageBuffer.h
M Source/WebCore/workers/DedicatedWorkerGlobalScope.cpp
M Source/WebCore/workers/Worker.cpp
Log Message:
-----------
[GTK][WPE][Skia] Allow cross-thread transfer of accelerated ImageBitmap
https://bugs.webkit.org/show_bug.cgi?id=283704
Reviewed by Nikolas Zimmermann and Carlos Garcia Campos.
When using skia, transferring ownership of accelerated ImageBitmaps causes GrDirectContext mismatches
that lead to problems with reading pixels, drawing etc. So far, to fix such problems, accelerated
ImageBitmaps were decelerated before transferring.
This change improves the above fix and allows the transfer of accelerated ImageBitmaps. To make such
ImageBitmaps working correctly, however, this change utilizes the code that re-wraps ImageBuffer with
a proper GrDirectContext. To make that operation safe, the fences are used.
* Source/WebCore/bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::dumpImageBitmap):
(WebCore::CloneDeserializer::readTransferredImageBitmap):
* Source/WebCore/html/ImageBitmap.cpp:
(WebCore::ImageBitmap::finalizeCrossThreadTransfer):
* Source/WebCore/html/ImageBitmap.h:
* Source/WebCore/platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::sinkIntoImageBufferForCrossThreadTransfer):
(WebCore::ImageBuffer::sinkIntoImageBufferAfterCrossThreadTransfer):
* Source/WebCore/platform/graphics/ImageBuffer.h:
* Source/WebCore/workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::postMessage):
* Source/WebCore/workers/Worker.cpp:
(WebCore::Worker::postMessage):
Canonical link: https://commits.webkit.org/287399@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list