fune/gfx/layers/ipc/PCompositorManager.ipdl
Noemi Erli d637b3f05e Backed out 24 changesets (bug 1824465) for causing failures in nsISupportsImpl.cpp CLOSED TREE
Backed out changeset a5c8f22b7170 (bug 1824465)
Backed out changeset b551b655ac72 (bug 1824465)
Backed out changeset 0e6768a6419c (bug 1824465)
Backed out changeset fb115ebb7fe0 (bug 1824465)
Backed out changeset aaa7a2c8aa3b (bug 1824465)
Backed out changeset 7ef94bfa90b3 (bug 1824465)
Backed out changeset a4238fd6b86f (bug 1824465)
Backed out changeset 3a88e4cfbe45 (bug 1824465)
Backed out changeset 40c2467d3162 (bug 1824465)
Backed out changeset 8f900395c72c (bug 1824465)
Backed out changeset 92e4c6e4d73c (bug 1824465)
Backed out changeset 445c5d5d9661 (bug 1824465)
Backed out changeset de51ed5389d9 (bug 1824465)
Backed out changeset 72049d72bcb6 (bug 1824465)
Backed out changeset 126773c2427a (bug 1824465)
Backed out changeset 886e76bc80be (bug 1824465)
Backed out changeset a69a851411f0 (bug 1824465)
Backed out changeset 703599cf6189 (bug 1824465)
Backed out changeset 11ecb78ebc15 (bug 1824465)
Backed out changeset 563255aaa1e1 (bug 1824465)
Backed out changeset d1bf32c2a6c6 (bug 1824465)
Backed out changeset ef28b2777487 (bug 1824465)
Backed out changeset a2015d354bb1 (bug 1824465)
Backed out changeset 31d6b53fdc6a (bug 1824465)
2023-04-06 01:50:55 +03:00

97 lines
3.6 KiB
Text

/* -*- 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 PCanvasManager;
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";
[MoveOnly] using mozilla::ipc::SharedMemoryBasic::Handle from "mozilla/ipc/SharedMemoryBasic.h";
using mozilla::layers::CompositorOptions from "mozilla/layers/LayersMessageUtils.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;
uint64_t innerWindowId;
};
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.
*/
[ManualDealloc, NeedsOtherPid]
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);
async InitCanvasManager(Endpoint<PCanvasManagerParent> endpoint);
child:
async NotifyWebRenderError(WebRenderError error);
};
} // layers
} // mozilla