2012-07-13 23:38:09 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
* 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/. */
|
|
|
|
|
2012-08-17 14:56:55 +04:00
|
|
|
include LayersSurfaces;
|
2013-09-06 19:41:00 +04:00
|
|
|
include LayersMessages;
|
2013-12-12 05:44:44 +04:00
|
|
|
include protocol PTexture;
|
2013-06-03 14:14:37 +04:00
|
|
|
include ProtocolTypes;
|
2015-07-05 21:56:04 +03:00
|
|
|
include protocol PMediaSystemResourceManager;
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 13:20:52 +04:00
|
|
|
|
2013-07-26 23:28:31 +04:00
|
|
|
include "mozilla/GfxMessageUtils.h";
|
2017-06-09 07:32:13 +03:00
|
|
|
include "mozilla/layers/LayersMessageUtils.h";
|
2017-04-20 04:24:13 +03:00
|
|
|
include "mozilla/layers/WebRenderMessageUtils.h";
|
2012-07-13 23:38:09 +04:00
|
|
|
|
2013-10-01 23:25:07 +04:00
|
|
|
using struct mozilla::layers::TextureInfo from "mozilla/layers/CompositorTypes.h";
|
2014-04-26 06:34:05 +04:00
|
|
|
using mozilla::layers::TextureFlags from "mozilla/layers/CompositorTypes.h";
|
2017-01-18 05:47:06 +03:00
|
|
|
using mozilla::layers::CompositableHandle from "mozilla/layers/LayersTypes.h";
|
2017-04-20 04:24:13 +03:00
|
|
|
using mozilla::wr::MaybeExternalImageId from "mozilla/webrender/WebRenderTypes.h";
|
2012-07-13 23:38:09 +04:00
|
|
|
|
2015-05-07 16:53:47 +03:00
|
|
|
using PlatformThreadId from "base/platform_thread.h";
|
|
|
|
|
2012-07-13 23:38:09 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace layers {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The PImageBridge protocol is used to allow isolated threads or processes to push
|
|
|
|
* frames directly to the compositor thread/process without relying on the main thread
|
|
|
|
* which might be too busy dealing with content script.
|
|
|
|
*/
|
2015-03-26 10:04:00 +03:00
|
|
|
sync protocol PImageBridge
|
2012-07-13 23:38:09 +04:00
|
|
|
{
|
2013-12-12 05:44:44 +04:00
|
|
|
manages PTexture;
|
2015-07-05 21:56:04 +03:00
|
|
|
manages PMediaSystemResourceManager;
|
2012-07-13 23:38:09 +04:00
|
|
|
|
2014-05-06 05:56:40 +04:00
|
|
|
child:
|
2014-06-08 17:18:53 +04:00
|
|
|
async ParentAsyncMessages(AsyncParentMessageData[] aMessages);
|
2014-05-06 05:56:40 +04:00
|
|
|
|
2015-07-06 06:02:26 +03:00
|
|
|
async DidComposite(ImageCompositeNotification[] aNotifications);
|
2012-08-17 14:56:55 +04:00
|
|
|
|
2015-07-06 06:02:26 +03:00
|
|
|
parent:
|
2015-05-07 16:53:47 +03:00
|
|
|
async ImageBridgeThreadId(PlatformThreadId aTreahdId);
|
|
|
|
|
2017-02-27 06:12:12 +03:00
|
|
|
// Creates a set of mappings between TextureReadLocks and an associated
|
|
|
|
// ReadLockHandle that can be used in Update, and persist until the
|
|
|
|
// next Update call.
|
|
|
|
async InitReadLocks(ReadLockInit[] locks);
|
|
|
|
|
2017-02-16 01:31:18 +03:00
|
|
|
async Update(CompositableOperation[] ops, OpDestroy[] toDestroy, uint64_t fwdTransactionId);
|
Bug 825928: Land layers refactoring. r=jrmuizel,bas,nical,mattwoodrow,roc,nrc,benwa,bjacob,jgilbert,kchen CLOSED TREE
Please contact Bas Schouten <bschouten@mozilla.com>, Nicolas Silva <nsilva@mozilla.com> or Nicholas Cameron <ncameron@mozilla.com> with general questions. Below is a rough list of authors to contact with specific questions.
Authors:
gfx/layers/Compositor.* gfx/layers/Effects.h - Compositor Interface - bas,nrc,nical
gfx/layers/d3d* - D3D9/D3D10 - bas
gfx/layers/ThebesLayer* - ThebesLayers - nrc,bas
gfx/layers/composite/* - CompositeLayers - nrc,nical
gfx/layers/client/* - Client - nrc,nical,bas
gfx/layers/*Image* - nical
gfx/layers/ipc ipc - IPC - nical
gfx/layers/opengl - CompositorOGL - nrc,nical
gfx/2d - bas,nrc
gfx/gl - GLContext - bjacob
dom/* layout/* - DOM - mattwoodrow
2013-04-10 13:20:52 +04:00
|
|
|
|
2014-05-07 13:06:19 +04:00
|
|
|
// First step of the destruction sequence. This puts ImageBridge
|
|
|
|
// in a state in which it can't send asynchronous messages
|
2015-11-24 05:33:32 +03:00
|
|
|
// so as to not race with the channel getting closed.
|
|
|
|
// In the child side, the Closing the channel does not happen right after WillClose,
|
2014-05-07 13:06:19 +04:00
|
|
|
// it is scheduled in the ImageBridgeChild's message queue in order to ensure
|
|
|
|
// that all of the messages from the parent side have been received and processed
|
2015-11-24 05:33:32 +03:00
|
|
|
// before sending closing the channel.
|
|
|
|
sync WillClose();
|
2012-07-13 23:38:09 +04:00
|
|
|
|
2017-04-20 04:24:13 +03:00
|
|
|
async PTexture(SurfaceDescriptor aSharedData, LayersBackend aBackend, TextureFlags aTextureFlags, uint64_t aSerial, MaybeExternalImageId aExternalImageId);
|
2015-07-05 21:56:04 +03:00
|
|
|
async PMediaSystemResourceManager();
|
2014-05-06 05:56:40 +04:00
|
|
|
|
Bug 1354411 - Rebuild CompositorSessions if WebRender is disabled r=kats
When WebRender creation is failed, WebRender is disabled in gecko. There is a case that WebRenderBridgeParents exist when WebRender is disabled. To handle this, gecko needs to rebuild all CompositorSessions.
There is also a problem related to gfxVars::UseWebRender on compositor thread. If e10s is enabled, but no-gpu process(default on linux and mac), gfxVars::UseWebRender change is soon notified by compositor thread tasks. If WebRender creation failure happens at 2nd WebRender creation, several WebRenderBridgeParents for 1st WebRender could exist. IPC messages from WebRenderLayerManager are normally async, then there is a chance that the WebRenderBridgeParents receive the messages after the gfxVars::UseWebRender change. Further the gfxVars::UseWebRender change in content process could be delayed than WebRenderBridgeParents, then content process does not have a way to stop sending PWebRenderBridge IPC until the change of gfxVars::UseWebRender is received. WebRenderBridgeParent related tasks handle the message, but some tasks are done based on gfxVars::UseWebRender. At this time, gfxVars::UseWebRender returned false on compositor thread, then it cause unexpected result for WebRenderBridgeParent and WebRender. To addres this inconsistent situation, WebRenderBridgeParent related tasks on compositor thread stop to use gfxVars::UseWebRender.
2017-08-04 08:36:41 +03:00
|
|
|
sync NewCompositable(CompositableHandle aHandle, TextureInfo aInfo, LayersBackend aBackend);
|
2017-01-18 05:47:06 +03:00
|
|
|
async ReleaseCompositable(CompositableHandle aHandle);
|
2012-07-13 23:38:09 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
} // namespace
|
|
|
|
|