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

Create GraphicsClient for the graphics specific subset of ChromeClient that needs to be accessed from worker threads. #6875

Merged

Conversation

mattwoodrow
Copy link
Contributor

@mattwoodrow mattwoodrow commented Nov 28, 2022

0192c42

Create GraphicsClient for the graphics specific subset of ChromeClient that needs to be accessed from worker threads.
https://bugs.webkit.org/show_bug.cgi?id=248415

Reviewed by Kimmo Kinnunen.

Creates new subclass for HostWindow 'GraphicsClient', for the graphics specific subset. This currently only has createImageBuffer, but in the future
will have other graphics-related WebKit functionality (like creating a WebGL context).

* Source/WebCore/Headers.cmake:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/CSSFilterImageValue.cpp:
* Source/WebCore/html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createImageBuffer const):
* Source/WebCore/html/ImageBitmap.cpp:
(WebCore::ImageBitmap::createImageBuffer):
(WebCore::ImageBitmap::createPromise):
* Source/WebCore/html/ImageBitmap.h:
* Source/WebCore/html/OffscreenCanvas.cpp:
(WebCore::OffscreenCanvas::transferToImageBitmap):
(WebCore::OffscreenCanvas::createImageBuffer const):
* Source/WebCore/platform/GraphicsClient.h: Added.
* Source/WebCore/page/Chrome.h:
* Source/WebCore/platform/HostWindow.h:
* Source/WebCore/platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::create):
* Source/WebCore/platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::CreationContext::CreationContext):
* Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:
(WebCore::ImageBufferIOSurfaceBackend::create):
* Source/WebCore/platform/graphics/cocoa/IOSurface.h:
* Source/WebCore/platform/graphics/cocoa/IOSurface.mm:
(WebCore::IOSurface::ensurePlatformContext):

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

a6d6f22

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

@mattwoodrow mattwoodrow self-assigned this Nov 28, 2022
@mattwoodrow mattwoodrow added the Layout and Rendering For bugs with layout and rendering of Web pages. label Nov 28, 2022
@@ -46,13 +46,14 @@ class TextStream;
namespace WebCore {

class GraphicsContext;
class HostWindow;
class GraphicsClient;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed ..

@mattwoodrow mattwoodrow added the merge-queue Applied to send a pull request to merge-queue label Nov 28, 2022
…t that needs to be accessed from worker threads.

https://bugs.webkit.org/show_bug.cgi?id=248415

Reviewed by Kimmo Kinnunen.

Creates new subclass for HostWindow 'GraphicsClient', for the graphics specific subset. This currently only has createImageBuffer, but in the future
will have other graphics-related WebKit functionality (like creating a WebGL context).

* Source/WebCore/Headers.cmake:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/CSSFilterImageValue.cpp:
* Source/WebCore/html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createImageBuffer const):
* Source/WebCore/html/ImageBitmap.cpp:
(WebCore::ImageBitmap::createImageBuffer):
(WebCore::ImageBitmap::createPromise):
* Source/WebCore/html/ImageBitmap.h:
* Source/WebCore/html/OffscreenCanvas.cpp:
(WebCore::OffscreenCanvas::transferToImageBitmap):
(WebCore::OffscreenCanvas::createImageBuffer const):
* Source/WebCore/platform/GraphicsClient.h: Added.
* Source/WebCore/page/Chrome.h:
* Source/WebCore/platform/HostWindow.h:
* Source/WebCore/platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::create):
* Source/WebCore/platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::CreationContext::CreationContext):
* Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:
(WebCore::ImageBufferIOSurfaceBackend::create):
* Source/WebCore/platform/graphics/cocoa/IOSurface.h:
* Source/WebCore/platform/graphics/cocoa/IOSurface.mm:
(WebCore::IOSurface::ensurePlatformContext):

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

Committed 257096@main (0192c42): https://commits.webkit.org/257096@main

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

@webkit-early-warning-system webkit-early-warning-system merged commit 0192c42 into WebKit:main Nov 29, 2022
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Nov 29, 2022
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