-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose GraphicsClient through ScriptExecutionContext
https://bugs.webkit.org/show_bug.cgi?id=261272 rdar://115108907 Reviewed by Matt Woodrow. Expose GraphicsClient through ScriptExecutionContext All DOM objects that construct graphics objects must do so via a factory that is able to create graphics objects (either local or remote). This factory interface is GraphicsClient. The objects obtain the instance via ScriptExecutionContext, either: - Document (via Chrome) - WorkerGlobalScope (via WorkerClient) Add ScriptExecutionContext::graphicsClient() to avoid doing various error-prone downcasting sequences. Make SerializedImageBuffer::sinkIntoImageBuffer() a similar function to ImageBuffer::create(), where the polymorphism is added with the GraphicsClient* and in-process variant is invoked if the instance is nullptr. * Source/WebCore/dom/Document.cpp: (WebCore::Document::graphicsClient): * Source/WebCore/dom/Document.h: * Source/WebCore/dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::graphicsClient): * Source/WebCore/html/CanvasBase.cpp: (WebCore::CanvasBase::allocateImageBuffer const): (WebCore::CanvasBase::graphicsClient const): Deleted. * Source/WebCore/html/CanvasBase.h: * Source/WebCore/html/ImageBitmap.cpp: (WebCore::ImageBitmap::createImageBuffer): * Source/WebCore/html/ImageBitmapBacking.cpp: (WebCore::ImageBitmapBacking::connect): * Source/WebCore/html/OffscreenCanvas.cpp: (WebCore::DetachedOffscreenCanvas::takeImageBuffer): (WebCore::OffscreenCanvas::pushBufferToPlaceholder): * Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::create): (WebCore::WebGLRenderingContextBase::maybeRestoreContext): * Source/WebCore/platform/GraphicsClient.h: * Source/WebCore/platform/graphics/ImageBuffer.cpp: (WebCore::SerializedImageBuffer::sinkIntoImageBuffer): * Source/WebCore/platform/graphics/ImageBuffer.h: * Source/WebCore/workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::graphicsClient): * Source/WebCore/workers/WorkerGlobalScope.h: Canonical link: https://commits.webkit.org/267938@main
- Loading branch information
1 parent
44bf0d7
commit a8f5521
Showing
14 changed files
with
40 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters