[webkit-changes] [WebKit/WebKit] 329f7d: ImageBufferBackend has three overlapping copy-like...
Kimmo Kinnunen
noreply at github.com
Thu Sep 21 02:47:37 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 329f7da0cc3778b668fd606736876062da438036
https://github.com/WebKit/WebKit/commit/329f7da0cc3778b668fd606736876062da438036
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2023-09-21 (Thu, 21 Sep 2023)
Changed paths:
M Source/WebCore/platform/graphics/CachedSubimage.cpp
M Source/WebCore/platform/graphics/GraphicsContext.cpp
M Source/WebCore/platform/graphics/GraphicsContext.h
M Source/WebCore/platform/graphics/ImageBuffer.cpp
M Source/WebCore/platform/graphics/ImageBuffer.h
M Source/WebCore/platform/graphics/ImageBufferBackend.cpp
M Source/WebCore/platform/graphics/ImageBufferBackend.h
M Source/WebCore/platform/graphics/SourceImage.cpp
M Source/WebCore/platform/graphics/ca/cocoa/GraphicsLayerAsyncContentsDisplayDelegateCocoa.mm
M Source/WebCore/platform/graphics/cairo/CairoOperations.cpp
M Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
M Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.h
M Source/WebCore/platform/graphics/cairo/ImageBufferCairoSurfaceBackend.cpp
M Source/WebCore/platform/graphics/cairo/ImageBufferCairoSurfaceBackend.h
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
M Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.cpp
M Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.h
M Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp
M Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.h
M Source/WebCore/platform/graphics/cg/NativeImageCG.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
M Source/WebKit/Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.h
M Source/WebKit/Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.mm
M Source/WebKit/Shared/WebImage.cpp
M Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp
M Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h
M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h
M Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferRemoteIOSurfaceBackend.cpp
M Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferRemoteIOSurfaceBackend.h
M Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.cpp
M Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.h
M Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBitmapBackend.cpp
M Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBitmapBackend.h
Log Message:
-----------
ImageBufferBackend has three overlapping copy-like functions
https://bugs.webkit.org/show_bug.cgi?id=261731
rdar://115718413
Reviewed by Matt Woodrow.
ImageBuffer and -Backend function copyNativeImage(BackingStoreCopy)
is actually two rather distinct functions: copy and a reference.
copyNativeImageForDrawing() is equivalent to
copyNativeImage(DontBackingStore) and certain custom logic needed for
the call chain.
Move the decision to do a copy for draw or a reference for draw into
top-level GraphicsContext. This information will be also used in future
when implementing more correct display list retaining of backing stores
as well as removing the image buffer related remote drawing commands.
Make a clear distinction between creating a copy and creating a
reference to the backing store by calling the functions with different
names. Use the function in more places that obtain a drawable
NativeImage out of an ImageBuffer.
Removes ImageBuffer::draw because it was a redudundant addition
to the call-stack:
GraphicsContext::drawImageBuffer
ImageBuffer::draw
Graphicscontext::drawNativeImageInternal
This is work towards making the NativeImage the only image primitive
being drawn from, where as currently also ImageBuffer is a
pseudo-primitive.
* Source/WebCore/platform/graphics/CachedSubimage.cpp:
(WebCore::CachedSubimage::draw):
* Source/WebCore/platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::nativeImageForDrawing):
(WebCore::GraphicsContext::drawImageBuffer):
* Source/WebCore/platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::deferred const):
* Source/WebCore/platform/graphics/ImageBuffer.cpp:
(WebCore::copyImageBufferToNativeImage):
(WebCore::ImageBuffer::copyNativeImage const):
(WebCore::ImageBuffer::createNativeImageReference const):
(WebCore::ImageBuffer::copyNativeImageForDrawing const): Deleted.
(WebCore::ImageBuffer::draw): Deleted.
* Source/WebCore/platform/graphics/ImageBuffer.h:
* Source/WebCore/platform/graphics/ImageBufferBackend.cpp:
(WebCore::ImageBufferBackend::sinkIntoNativeImage):
(WebCore::ImageBufferBackend::copyNativeImageForDrawing): Deleted.
* Source/WebCore/platform/graphics/ImageBufferBackend.h:
(WebCore::ImageBufferBackend::finalizeDrawIntoContext): Deleted.
* Source/WebCore/platform/graphics/SourceImage.cpp:
(WebCore::SourceImage::nativeImage const):
* Source/WebCore/platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::drawShadowLayerBuffer):
(WebCore::Cairo::drawShadowImage):
(WebCore::Cairo::fillShadowBuffer):
* Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContextCairo::clipToImageBuffer):
(WebCore::GraphicsContextCairo::drawFocusRing): Deleted.
(WebCore::GraphicsContextCairo::drawLinesForText): Deleted.
(WebCore::GraphicsContextCairo::drawDotsForDocumentMarker): Deleted.
(WebCore::GraphicsContextCairo::translate): Deleted.
(WebCore::GraphicsContextCairo::didUpdateState): Deleted.
(WebCore::GraphicsContextCairo::concatCTM): Deleted.
(WebCore::GraphicsContextCairo::setCTM): Deleted.
(WebCore::GraphicsContextCairo::beginTransparencyLayer): Deleted.
(WebCore::GraphicsContextCairo::endTransparencyLayer): Deleted.
(WebCore::GraphicsContextCairo::clearRect): Deleted.
(WebCore::GraphicsContextCairo::strokeRect): Deleted.
(WebCore::GraphicsContextCairo::setLineCap): Deleted.
(WebCore::GraphicsContextCairo::setLineDash): Deleted.
(WebCore::GraphicsContextCairo::setLineJoin): Deleted.
(WebCore::GraphicsContextCairo::setMiterLimit): Deleted.
(WebCore::GraphicsContextCairo::clipOut): Deleted.
(WebCore::GraphicsContextCairo::rotate): Deleted.
(WebCore::GraphicsContextCairo::scale): Deleted.
(WebCore::GraphicsContextCairo::fillRoundedRectImpl): Deleted.
(WebCore::GraphicsContextCairo::fillRectWithRoundedHole): Deleted.
(WebCore::GraphicsContextCairo::drawPattern): Deleted.
(WebCore::GraphicsContextCairo::renderingMode const): Deleted.
(WebCore::GraphicsContextCairo::cr const): Deleted.
(WebCore::GraphicsContextCairo::layers): Deleted.
(WebCore::GraphicsContextCairo::pushImageMask): Deleted.
* Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.h:
* Source/WebCore/platform/graphics/cairo/ImageBufferCairoSurfaceBackend.cpp:
(WebCore::ImageBufferCairoSurfaceBackend::copyNativeImage):
(WebCore::ImageBufferCairoSurfaceBackend::createNativeImageReference):
(WebCore::ImageBufferCairoSurfaceBackend::cairoSurfaceCoerceToImage):
* Source/WebCore/platform/graphics/cairo/ImageBufferCairoSurfaceBackend.h:
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::isDeferredForCGContext):
(WebCore::GraphicsContextCG::GraphicsContextCG):
(WebCore::GraphicsContextCG::clipToImageBuffer):
* Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.cpp:
(WebCore::ImageBufferCGBitmapBackend::copyNativeImage):
(WebCore::ImageBufferCGBitmapBackend::createNativeImageReference):
* Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.h:
* Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:
(WebCore::ImageBufferIOSurfaceBackend::copyNativeImage):
(WebCore::ImageBufferIOSurfaceBackend::createNativeImageReference):
(WebCore::ImageBufferIOSurfaceBackend::copyNativeImageForDrawing): Deleted.
* Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.h:
* Source/WebCore/platform/graphics/cg/NativeImageCG.cpp:
(WebCore::NativeImage::draw):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::Recorder):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h:
(WebCore::DisplayList::Recorder::Recorder):
* Source/WebKit/Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.h:
* Source/WebKit/Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.mm:
(WebKit::CGDisplayListImageBufferBackend::copyNativeImage):
(WebKit::CGDisplayListImageBufferBackend::createNativeImageReference):
* Source/WebKit/Shared/WebImage.cpp:
(WebKit::WebImage::copyNativeImage const):
* Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp:
(WebKit::ImageBufferShareableBitmapBackend::copyNativeImage):
(WebKit::ImageBufferShareableBitmapBackend::createNativeImageReference):
* Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::RemoteDisplayListRecorderProxy):
* Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.cpp:
(WebKit::RemoteImageBufferProxy::copyNativeImage const):
(WebKit::RemoteImageBufferProxy::createNativeImageReference const):
(WebKit::RemoteImageBufferProxy::copyNativeImageForDrawing const): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
* Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferRemoteIOSurfaceBackend.cpp:
(WebKit::ImageBufferRemoteIOSurfaceBackend::copyNativeImage):
(WebKit::ImageBufferRemoteIOSurfaceBackend::createNativeImageReference):
* Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferRemoteIOSurfaceBackend.h:
* Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.cpp:
(WebKit::ImageBufferShareableMappedIOSurfaceBackend::copyNativeImage):
* Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.h:
* Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBitmapBackend.cpp:
(WebKit::ImageBufferShareableMappedIOSurfaceBitmapBackend::copyNativeImage):
(WebKit::ImageBufferShareableMappedIOSurfaceBitmapBackend::createNativeImageReference):
(WebKit::ImageBufferShareableMappedIOSurfaceBitmapBackend::copyNativeImageForDrawing): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBitmapBackend.h:
Canonical link: https://commits.webkit.org/268243@main
More information about the webkit-changes
mailing list