diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /gfx/layers/ipc/PCompositorManager.ipdl | |
parent | Initial commit. (diff) | |
download | firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/layers/ipc/PCompositorManager.ipdl')
-rw-r--r-- | gfx/layers/ipc/PCompositorManager.ipdl | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/gfx/layers/ipc/PCompositorManager.ipdl b/gfx/layers/ipc/PCompositorManager.ipdl new file mode 100644 index 0000000000..93f08e532b --- /dev/null +++ b/gfx/layers/ipc/PCompositorManager.ipdl @@ -0,0 +1,92 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * vim: sw=2 ts=8 et : + */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +include protocol PCompositorBridge; +include LayersSurfaces; +include "mozilla/GfxMessageUtils.h"; +include "mozilla/layers/WebRenderMessageUtils.h"; + +using struct mozilla::void_t from "mozilla/ipc/IPCCore.h"; +using mozilla::TimeDuration from "mozilla/TimeStamp.h"; +using mozilla::CSSToLayoutDeviceScale from "Units.h"; +using mozilla::gfx::IntSize from "mozilla/gfx/2D.h"; +using mozilla::ipc::SharedMemoryBasic::Handle from "mozilla/ipc/SharedMemoryBasic.h"; +using mozilla::layers::CompositorOptions from "mozilla/layers/CompositorOptions.h"; +using mozilla::wr::ExternalImageId from "mozilla/webrender/WebRenderTypes.h"; +using mozilla::wr::MemoryReport from "mozilla/webrender/WebRenderTypes.h"; +using mozilla::wr::WebRenderError from "mozilla/webrender/WebRenderTypes.h"; +using mozilla::layers::SharedSurfacesMemoryReport from "mozilla/layers/SharedSurfacesMemoryReport.h"; + +namespace mozilla { +namespace layers { + +struct WidgetCompositorOptions { + CSSToLayoutDeviceScale scale; + TimeDuration vsyncRate; + CompositorOptions options; + bool useExternalSurfaceSize; + IntSize surfaceSize; +}; + +struct ContentCompositorOptions { +}; + +struct SameProcessWidgetCompositorOptions { +}; + +union CompositorBridgeOptions { + ContentCompositorOptions; + WidgetCompositorOptions; + SameProcessWidgetCompositorOptions; +}; + +/** + * The PCompositorManager protocol is the top-level protocol between the + * compositor thread and the creators of compositors. It exists in the + * following conditions: + * - One PCompositorManager between the GPU process and each content process. + * If the GPU/UI processes are combined, there is one PCompositorManager + * between the combined GPU/UI process and each content process. + * - One PCompositorManager between the GPU process and the UI process. If + * they are combined, there is still one PCompositorManager, but both the + * child and parent live in the same process. + * The intention for this protocol is to facilitate communication with the + * compositor thread for compositor data that is only shared once, rather than + * per PCompositorBridge instance. + */ +sync protocol PCompositorManager +{ + manages PCompositorBridge; + +parent: + /** + * There are three variants of a PCompositorBridge protocol, each of which can + * only be created by certain processes and configurations: + * - A "content" PCompositorBridge is requested by each content process, + * representing the drawable area for Web content. + * - A "widget" PCompositorBridge is requested by the UI process for each + * "top level browser window" for chrome and such. + * - A "same process widget" PCompositorBridge is requested by the combined + * GPU/UI process for each "top level browser window" as above. + * See gfx/layers/ipc/PCompositorBridge.ipdl for more details. + */ + async PCompositorBridge(CompositorBridgeOptions options); + + async AddSharedSurface(ExternalImageId aId, SurfaceDescriptorShared aDesc); + async RemoveSharedSurface(ExternalImageId aId); + async ReportSharedSurfacesMemory() returns (SharedSurfacesMemoryReport aReport); + + async NotifyMemoryPressure(); + + async ReportMemory() returns (MemoryReport aReport); + +child: + async NotifyWebRenderError(WebRenderError error); +}; + +} // layers +} // mozilla |