1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
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";
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
25 [NeedsOtherPid, ParentProc=compositor, ChildProc=anydom]
26 sync protocol PCanvasManager
35 // Actor that represents one WebGL context.
38 // Actor that represents one WebGPU context.
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
48 sync GetSnapshot(uint32_t aManagerId, int32_t aProtocolId, RemoteTextureOwnerId? ownerId) returns (FrontBufferSnapshotIpc ret);