-
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.
ImageBufferCreationContext is used in wrong ImageBuffer::create facto…
…ry function https://bugs.webkit.org/show_bug.cgi?id=261259 rdar://115098672 Reviewed by Matt Woodrow. ImageBufferCreationContext is ad hoc amalgamation of all parameters accepted by any ImageBufferBackend, populated for the purpose of constructing a specific backend. ImageBuffer::create<Backend>(..., const ImageBufferCreationContext&) is the concrete function constructing a specific ImageBuffer type with a specific backend. ImageBuffer::create(...) is a polymorphic factory, which invokes the GraphicsClient, a polymorphic interface. It doesn't request a specific backend, rather the polymorphism selects the backend based on policy. This function shouldn't accept ImageBufferCreationContext, there's nothing that can be populated by the caller, except fields incorrectly added to ImageBufferCreationContext. Remove ImageBufferCreationContext from ImageBuffer::create(...). It cannot be populated from the call sites, as the call sites don't know what type of buffers will be created -- that is the part that is abstracted. Remove GraphicsClient from ImageBufferCreationContext. GraphicsClient is the polymorphic factory, which is pointless in context of ImageBufferCreationContext. ImageBufferCreationContext is used when the concrete type is known at the call site. Move ImageBufferCreationContext::avoidIOSurfaceSizeCheckInWebProcessForTesting as ImageBufferOptions::AvoidBackendSizeCheckForTesting. The property is a testing property, configuring the behavior of ImageBuffer::create(...). * Source/WebCore/html/CanvasBase.cpp: (WebCore::CanvasBase::allocateImageBuffer const): * Source/WebCore/html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::createBufferForPainting const): * Source/WebCore/html/ImageBitmap.cpp: (WebCore::ImageBitmap::createImageBuffer): * Source/WebCore/page/FrameSnapshotting.cpp: (WebCore::snapshotFrameRectWithClip): * Source/WebCore/platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::create): * Source/WebCore/platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::create): (WebCore::ImageBufferCreationContext::ImageBufferCreationContext): Deleted. * Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp: (WebCore::ImageBufferIOSurfaceBackend::create): * Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.h: * Source/WebCore/rendering/style/StyleFilterImage.cpp: (WebCore::StyleFilterImage::image const): * Source/WebCore/svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImage): * Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp: (WebKit::RemoteRenderingBackend::moveToImageBuffer): (WebKit::RemoteRenderingBackend::createImageBuffer): * Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm: (WebKit::RemoteLayerBackingStoreCollection::allocateBufferForBackingStore): * Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.cpp: (WebKit::ImageBufferShareableMappedIOSurfaceBackend::create): Canonical link: https://commits.webkit.org/267792@main
- Loading branch information
1 parent
ffad4d2
commit 61d979e
Showing
15 changed files
with
40 additions
and
54 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
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