[webkit-changes] [WebKit/WebKit] b3f976: IPC stream buffer interface allows creating npot b...
Kimmo Kinnunen
noreply at github.com
Sat Jan 14 00:45:48 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b3f9762fcd0a0e27240fb9153817166be4297403
https://github.com/WebKit/WebKit/commit/b3f9762fcd0a0e27240fb9153817166be4297403
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2023-01-14 (Sat, 14 Jan 2023)
Changed paths:
M LayoutTests/ipc/stream-buffer-read-write.html
M LayoutTests/ipc/stream-check-autoreleasepool.html
M LayoutTests/ipc/stream-sync-reply-shared-memory.html
M Source/WebKit/Platform/IPC/StreamClientConnection.cpp
M Source/WebKit/Platform/IPC/StreamClientConnection.h
M Source/WebKit/Platform/IPC/StreamConnectionBuffer.cpp
M Source/WebKit/Platform/IPC/StreamConnectionBuffer.h
M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp
M Source/WebKit/WebProcess/WebPage/IPCTestingAPI.cpp
M Tools/TestWebKitAPI/Tests/IPC/StreamConnectionBufferTests.cpp
M Tools/TestWebKitAPI/Tests/IPC/StreamConnectionTests.cpp
Log Message:
-----------
IPC stream buffer interface allows creating npot buffer sizes
https://bugs.webkit.org/show_bug.cgi?id=250557
rdar://104217729
Reviewed by Antti Koivisto.
Non-power of two buffer sizes are problematic because the circular buffer
algorithm benefits from using power of two buffers. The property will
be used in future commits.
Use log2 number in the API to enforce that only power-of-two buffers
are used.
Additionally, the API was taking in the shared memory buffer size. Since
the header is an implementation detail of the communciation buffer, change
the implementation to take in the expected data size and adjust the size in
the implementation.
* Source/WebKit/Platform/IPC/StreamClientConnection.cpp:
(IPC::StreamClientConnection::create):
(IPC::StreamClientConnection::StreamClientConnection):
* Source/WebKit/Platform/IPC/StreamClientConnection.h:
* Source/WebKit/Platform/IPC/StreamConnectionBuffer.cpp:
(IPC::StreamConnectionBuffer::StreamConnectionBuffer):
* Source/WebKit/Platform/IPC/StreamConnectionBuffer.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
(WebKit::RemoteGraphicsContextGLProxy::RemoteGraphicsContextGLProxy):
* Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::ensureGPUProcessConnection):
* Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp:
(WebKit::RemoteGPUProxy::RemoteGPUProxy):
* Source/WebKit/WebProcess/WebPage/IPCTestingAPI.cpp:
(WebKit::IPCTestingAPI::JSIPC::createStreamClientConnection):
* Tools/TestWebKitAPI/Tests/IPC/StreamConnectionBufferTests.cpp:
(TestWebKitAPI::TEST):
* Tools/TestWebKitAPI/Tests/IPC/StreamConnectionTests.cpp:
Canonical link: https://commits.webkit.org/258911@main
More information about the webkit-changes
mailing list