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
Use CAIOSurface to cache IOSurfaces in the UI process. #11270
Conversation
EWS run on previous version of this PR (hash f5fe53e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please look at the layout test crash.
@@ -189,6 +191,8 @@ class IOSurface final { | |||
|
|||
RetainPtr<IOSurfaceRef> m_surface; | |||
|
|||
mutable RetainPtr<id> m_caSurface; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like a comment to say what the id
really is (a CAIOSurfaceRef
).
@@ -204,6 +208,11 @@ class RemoteLayerBackingStore { | |||
// FIXME: This should be removed and m_bufferHandle should be used to ref the buffer once ShareableBitmapHandle | |||
// can be encoded multiple times. http://webkit.org/b/234169 | |||
std::optional<MachSendRight> m_contentsBufferHandle; | |||
RetainPtr<id> m_contentsBuffer; | |||
|
|||
std::optional<WebCore::RenderingResourceIdentifier> m_frontBufferIdentifier; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My review comment was going to be "Don't we have these already in Buffer
classes above" but then I realize these are only used in the UI process. I think that's enough to justify either splitting RemoteLayerBackingStore
into WP and UIP classes, or at least grouping the data members into structs which make it plain which process they are used it.
@@ -87,6 +87,16 @@ class RemoteLayerTreeNode : public CanMakeWeakPtr<RemoteLayerTreeNode> { | |||
Markable<WebCore::LayerHostingContextIdentifier> remoteContextHostedIdentifier() const { return m_remoteContextHostedIdentifier; } | |||
void setRemoteContextHostedIdentifier(WebCore::LayerHostingContextIdentifier identifier) { m_remoteContextHostedIdentifier = identifier; } | |||
|
|||
struct CachedContentsBuffer { | |||
WebCore::RenderingResourceIdentifier m_renderingResourceIdentifier; | |||
RetainPtr<id> m_buffer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add comment to say what the id
really is.
f5fe53e
to
c73c07c
Compare
EWS run on previous version of this PR (hash c73c07c) |
c73c07c
to
8ad069f
Compare
EWS run on current version of this PR (hash 8ad069f) |
https://bugs.webkit.org/show_bug.cgi?id=253620 Reviewed by Simon Fraser. We can cache CAIOSurface objects for our layer buffers in the UI process. This keeps CA rendering data alive, without marking the IOSurface as being in-use. * Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj: * Source/WebCore/platform/graphics/cocoa/IOSurface.h: * Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h: * Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::decode): (WebKit::RemoteLayerBackingStore::updateCachedBuffers): * Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeNode.h: Canonical link: https://commits.webkit.org/261553@main
8ad069f
to
e95212f
Compare
Committed 261553@main (e95212f): https://commits.webkit.org/261553@main Reviewed commits have been landed. Closing PR #11270 and removing active labels. |
e95212f
8ad069f
π mac-AS-debugπ§ͺ wpe-wk2π§ͺ ios-wk2π§ͺ api-gtkπ§ͺ mac-AS-debug-wk2