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

Use generateThreadSafe for RenderingResourceIdentifier. #12226

Merged

Conversation

mattwoodrow
Copy link
Contributor

@mattwoodrow mattwoodrow commented Mar 31, 2023

3050026

Use generateThreadSafe for RenderingResourceIdentifier.
https://bugs.webkit.org/show_bug.cgi?id=254796
<rdar://105752952>

Reviewed by Simon Fraser.

We can allocate ImageBuffers from a worker thread, so we need to use the thread safe allocator
for all RenderingResourceIdentifiers.

* Source/WebCore/platform/graphics/DecomposedGlyphs.h:
* Source/WebCore/platform/graphics/Font.cpp:
(WebCore::Font::renderingResourceIdentifier const):
* Source/WebCore/platform/graphics/ImageBuffer.h:
* Source/WebCore/platform/graphics/NativeImage.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
* Tools/TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/262486@main

bcfb7b6

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2   πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk1   πŸ§ͺ gtk-wk2
βœ… πŸ›  tv βœ… πŸ§ͺ mac-wk2   πŸ§ͺ api-gtk
βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  watch βœ… πŸ§ͺ mac-wk2-stress
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch-sim

@mattwoodrow mattwoodrow self-assigned this Mar 31, 2023
@mattwoodrow mattwoodrow added the Layout and Rendering For bugs with layout and rendering of Web pages. label Mar 31, 2023
@smfr
Copy link
Contributor

smfr commented Mar 31, 2023

We allocate rendering resources from multiple threads, so we need to use the thread safe allocator.

Would be nice to give an example of an off-main-thread call site. Offscreen canvas only, or something else?

@mattwoodrow mattwoodrow added the merge-queue Applied to send a pull request to merge-queue label Apr 2, 2023
https://bugs.webkit.org/show_bug.cgi?id=254796
<rdar://105752952>

Reviewed by Simon Fraser.

We can allocate ImageBuffers from a worker thread, so we need to use the thread safe allocator
for all RenderingResourceIdentifiers.

* Source/WebCore/platform/graphics/DecomposedGlyphs.h:
* Source/WebCore/platform/graphics/Font.cpp:
(WebCore::Font::renderingResourceIdentifier const):
* Source/WebCore/platform/graphics/ImageBuffer.h:
* Source/WebCore/platform/graphics/NativeImage.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
* Tools/TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/262486@main
@webkit-commit-queue
Copy link
Collaborator

Committed 262486@main (3050026): https://commits.webkit.org/262486@main

Reviewed commits have been landed. Closing PR #12226 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 3050026 into WebKit:main Apr 2, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Layout and Rendering For bugs with layout and rendering of Web pages.
Projects
None yet
4 participants