With CompositorState in place, Browser and WebContent need an actual wire protocol to drive it: which calls are sync, who validates that a WebContent is allowed to touch a given context, how compositor loss propagates back to the renderer. This commit fills in the four endpoints around CompositorState and the matching WebContent-side helpers so the future remote host can forward CompositorHost calls directly. The service still has no clients, so default rendering is unchanged.
35 lines
829 B
C++
35 lines
829 B
C++
/*
|
|
* Copyright (c) 2026, the Ladybird developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibWebView/CompositorClient.h>
|
|
|
|
#include <LibCore/EventLoop.h>
|
|
|
|
namespace WebView {
|
|
|
|
CompositorClient::CompositorClient(NonnullOwnPtr<IPC::Transport> transport)
|
|
: IPC::ConnectionToServer<CompositorControlClientEndpoint, CompositorControlServerEndpoint>(*this, move(transport))
|
|
{
|
|
}
|
|
|
|
void CompositorClient::die()
|
|
{
|
|
if (auto callback = move(on_death)) {
|
|
Core::deferred_invoke([callback = move(callback)]() mutable {
|
|
callback();
|
|
});
|
|
}
|
|
}
|
|
|
|
void CompositorClient::did_allocate_backing_stores(Web::Compositor::CompositorContextId, i32, Gfx::SharedImage, i32, Gfx::SharedImage)
|
|
{
|
|
}
|
|
|
|
void CompositorClient::did_present_frame(Web::Compositor::CompositorContextId, Gfx::IntRect, i32)
|
|
{
|
|
}
|
|
|
|
}
|