1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 include LayersSurfaces;
7 include LayersMessages;
8 include protocol PCompositable;
9 include protocol PLayer;
10 include protocol PTexture;
11 include ProtocolTypes;
13 include "mozilla/GfxMessageUtils.h";
15 using struct mozilla::layers::TextureInfo from "mozilla/layers/CompositorTypes.h";
16 using mozilla::layers::TextureFlags from "mozilla/layers/CompositorTypes.h";
22 * The PImageBridge protocol is used to allow isolated threads or processes to push
23 * frames directly to the compositor thread/process without relying on the main thread
24 * which might be too busy dealing with content script.
26 intr protocol PImageBridge
28 manages PCompositable;
32 async ParentAsyncMessages(AsyncParentMessageData[] aMessages);
36 sync Update(CompositableOperation[] ops) returns (EditReply[] reply);
37 async UpdateNoSwap(CompositableOperation[] ops);
39 // First step of the destruction sequence. This puts ImageBridge
40 // in a state in which it can't send asynchronous messages
41 // so as to not race with the upcomming Stop message and destruction.
42 // In the child side, the Stop message is not sent right after WillStop,
43 // it is scheduled in the ImageBridgeChild's message queue in order to ensure
44 // that all of the messages from the parent side have been received and processed
45 // before sending Stop, and that after Stop returns, there is no message in
46 // flight on any side and we can safely destroy the channel and threads.
51 sync PCompositable(TextureInfo aInfo) returns (uint64_t id);
52 async PTexture(SurfaceDescriptor aSharedData, TextureFlags aTextureFlags);
54 async ChildAsyncMessages(AsyncChildMessageData[] aMessages);