Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f92c75b5eb3f5701b5a37283816170d8f861e829
https://github.com/WebKit/WebKit/commit/f92c75b5eb3f5701b5a37283816170d8f861e829
Author: Matt Woodrow <[email protected]>
Date: 2022-12-10 (Sat, 10 Dec 2022)
Changed paths:
M Source/WebCore/PlatformMac.cmake
M Source/WebCore/SourcesCocoa.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/html/OffscreenCanvas.cpp
M Source/WebCore/html/canvas/CanvasRenderingContext.cpp
M Source/WebCore/html/canvas/CanvasRenderingContext.h
M Source/WebCore/html/canvas/PlaceholderRenderingContext.cpp
M Source/WebCore/html/canvas/PlaceholderRenderingContext.h
M Source/WebCore/platform/graphics/GraphicsLayer.cpp
M Source/WebCore/platform/graphics/GraphicsLayer.h
M Source/WebCore/platform/graphics/GraphicsLayerContentsDisplayDelegate.h
M Source/WebCore/platform/graphics/ImageBufferPipe.cpp
M Source/WebCore/platform/graphics/ImageBufferPipe.h
M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
A
Source/WebCore/platform/graphics/ca/cocoa/GraphicsLayerAsyncContentsDisplayDelegateCocoa.h
A
Source/WebCore/platform/graphics/ca/cocoa/GraphicsLayerAsyncContentsDisplayDelegateCocoa.mm
M Source/WebCore/platform/graphics/nicosia/NicosiaImageBufferPipe.cpp
M Source/WebCore/platform/graphics/nicosia/NicosiaImageBufferPipe.h
M Source/WebCore/rendering/RenderLayerBacking.cpp
M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/GraphicsLayerCARemote.h
Log Message:
-----------
Implement ImageBufferPipe for CoreAnimation so that we can update frames
without using the main-thread
https://bugs.webkit.org/show_bug.cgi?id=244878
<rdar://problem/99902985>
Creates a new API for pushing contents to a layer. The requirements here are
that it works asynchronously (from a worker thread),
and that it works with UI process compositing (can't access any platform
layers).
The existing APIs are insufficient, since setContentsToPlatformLayer won't work
in the WebProcess if UI-side compositing is enabled,
and setContentsDisplayDelegate has main-thread callbacks for the delegate to
provide new contents.
This adds a new API GraphicsLayerAsyncContentsDisplayDelegate, which get
allocated on-demand by the GraphicsLayer implementation and
allows the consumer to push an ImageBuffer that will be copied into the
GraphicsLayer asynchronously.
It adds an implementation of this new delegate type for GraphicsLayerCA, and a
non-nicosia implementation of ImageBufferPipe which
uses it for frame transfer.
ImageBufferPipe (and the new delegate) both work by providing an ImageBuffer
reference that needs to be copied if it succeeds, so that we
never end up copying in the caller and not using the frame.
Reviewed by Simon Fraser.
* Source/WebCore/PlatformMac.cmake:
* Source/WebCore/SourcesCocoa.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/html/canvas/CanvasRenderingContext.h:
(WebCore::CanvasRenderingContext::usesPlatformLayer const):
(WebCore::CanvasRenderingContext::platformLayer):
* Source/WebCore/html/canvas/PlaceholderRenderingContext.cpp:
(WebCore::PlaceholderRenderingContext::usesPlatformLayer const):
(WebCore::PlaceholderRenderingContext::platformLayer):
* Source/WebCore/html/canvas/PlaceholderRenderingContext.h:
* Source/WebCore/platform/graphics/ImageBufferPipe.cpp:
* Source/WebCore/platform/graphics/ImageBufferPipe.h:
(WebCore::ImageBufferPipe::usesPlatformLayer const):
(WebCore::ImageBufferPipe::platformLayer):
* Source/WebCore/platform/graphics/cocoa/ImageBufferPipeCA.mm: Added.
(WebCore::ImageBufferPipeSourceCA::ImageBufferPipeSourceCA):
(WebCore::ImageBufferPipeCA::ImageBufferPipeCA):
(WebCore::ImageBufferPipe::create):
* Source/WebCore/platform/graphics/cv/VideoFrameCV.mm:
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateConfiguration):
Canonical link: https://commits.webkit.org/257696@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes