Bug 1890689 accumulate input in LargerReceiverBlockSizeThanDesiredBuffering GTest...
[gecko.git] / gfx / ipc / PCanvasManager.ipdl
blob1ba6a88a422d3daac007c8c59bcea743d999f27f
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2  * vim: sw=2 ts=8 et :
3  */
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 include "mozilla/layers/LayersMessageUtils.h";
9 include protocol PCanvas;
10 include protocol PWebGL;
11 include protocol PWebGPU;
13 using mozilla::layers::RemoteTextureOwnerId from "mozilla/layers/LayersTypes.h";
14 using mozilla::webgl::FrontBufferSnapshotIpc from "mozilla/dom/WebGLIpdl.h";
16 namespace mozilla {
17 namespace gfx {
19 /**
20  * The PCanvasManager protocol is the top-level protocol between the main and
21  * worker threads in the content process, and the renderer thread in the
22  * compositor process. This protocol should be used to create accelerated
23  * canvas instances.
24  */
25 [NeedsOtherPid, ParentProc=compositor, ChildProc=anydom]
26 sync protocol PCanvasManager
28   manages PCanvas;
29   manages PWebGL;
30   manages PWebGPU;
32 parent:
33   async PCanvas();
35   // Actor that represents one WebGL context.
36   async PWebGL();
38   // Actor that represents one WebGPU context.
39   async PWebGPU();
41   // Set the local manager ID for the canvas manager.
42   async Initialize(uint32_t aManagerId);
44   // Get the front buffer pixels for the given manager/protocol. This is
45   // intended to be used by the main thread in the content process to block
46   // reading without having to block on the worker thread that owns the context
47   // instance.
48   sync GetSnapshot(uint32_t aManagerId, int32_t aProtocolId, RemoteTextureOwnerId? ownerId) returns (FrontBufferSnapshotIpc ret);
51 } // gfx
52 } // mozilla