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/. */
|
|
|
|
|
|
|
|
#ifndef MOZILLA_GFX_IMAGEBRIDGECHILD_H
|
|
|
|
#define MOZILLA_GFX_IMAGEBRIDGECHILD_H
|
|
|
|
|
|
|
|
#include "mozilla/layers/PImageBridgeChild.h"
|
|
|
|
#include "nsAutoPtr.h"
|
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
|
|
|
#include "mozilla/layers/CompositableForwarder.h"
|
|
|
|
#include "mozilla/layers/LayersTypes.h"
|
2012-07-13 23:38:09 +04:00
|
|
|
|
|
|
|
class gfxSharedImageSurface;
|
|
|
|
|
|
|
|
namespace base {
|
|
|
|
class Thread;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace layers {
|
|
|
|
|
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
|
|
|
class ImageClient;
|
|
|
|
class ImageContainer;
|
2012-07-13 23:38:09 +04:00
|
|
|
class ImageBridgeParent;
|
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
|
|
|
class SurfaceDescriptor;
|
|
|
|
class CompositableClient;
|
|
|
|
class CompositableTransaction;
|
|
|
|
class ShadowableLayer;
|
2012-07-13 23:38:09 +04:00
|
|
|
class Image;
|
|
|
|
|
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
|
|
|
|
2012-07-13 23:38:09 +04:00
|
|
|
/**
|
|
|
|
* Returns true if the current thread is the ImageBrdigeChild's thread.
|
|
|
|
*
|
|
|
|
* Can be called from any thread.
|
|
|
|
*/
|
|
|
|
bool InImageBridgeChildThread();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The ImageBridge protocol is meant to allow ImageContainers to forward images
|
|
|
|
* directly to the compositor thread/process without using the main thread.
|
|
|
|
*
|
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
|
|
|
* ImageBridgeChild is a CompositableForwarder just like ShadowLayerForwarder.
|
|
|
|
* This means it also does transactions with the compositor thread/process,
|
|
|
|
* except that the transactions are restricted to operations on the Compositables
|
|
|
|
* and cannot contain messages affecting layers directly.
|
|
|
|
*
|
|
|
|
* ImageBridgeChild is also a ISurfaceAllocator. It can be used to allocate or
|
|
|
|
* deallocate data that is shared with the compositor. The main differerence
|
|
|
|
* with other ISurfaceAllocators is that some of its overriden methods can be
|
|
|
|
* invoked from any thread.
|
|
|
|
*
|
2012-07-13 23:38:09 +04:00
|
|
|
* There are three important phases in the ImageBridge protocol. These three steps
|
|
|
|
* can do different things depending if (A) the ImageContainer uses ImageBridge
|
|
|
|
* or (B) it does not use ImageBridge:
|
|
|
|
*
|
|
|
|
* - When an ImageContainer calls its method SetCurrentImage:
|
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
|
|
|
* - (A) The image is sent directly to the compositor process through the
|
2012-07-13 23:38:09 +04:00
|
|
|
* ImageBridge IPDL protocol.
|
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
|
|
|
* On the compositor side the image is stored in a global table that associates
|
|
|
|
* the image with an ID corresponding to the ImageContainer, and a composition is
|
2012-07-13 23:38:09 +04:00
|
|
|
* triggered.
|
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
|
|
|
* - (B) Since it does not have an ImageBridge, the image is not sent yet.
|
|
|
|
* instead the will be sent to the compositor during the next layer transaction
|
2012-07-13 23:38:09 +04:00
|
|
|
* (on the main thread).
|
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
|
|
|
*
|
2012-07-13 23:38:09 +04:00
|
|
|
* - During a Layer transaction:
|
|
|
|
* - (A) The ImageContainer uses ImageBridge. The image is already available to the
|
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
|
|
|
* compositor process because it has been sent with SetCurrentImage. Yet, the
|
|
|
|
* CompositableHost on the compositor side will needs the ID referring to the
|
2012-07-13 23:38:09 +04:00
|
|
|
* ImageContainer to access the Image. So during the Swap operation that happens
|
|
|
|
* in the transaction, we swap the container ID rather than the image data.
|
|
|
|
* - (B) Since the ImageContainer does not use ImageBridge, the image data is swaped.
|
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
|
|
|
*
|
2012-07-13 23:38:09 +04:00
|
|
|
* - During composition:
|
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
|
|
|
* - (A) The CompositableHost has an AsyncID, it looks up the ID in the
|
2012-07-13 23:38:09 +04:00
|
|
|
* global table to see if there is an image. If there is no image, nothing is rendered.
|
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
|
|
|
* - (B) The CompositableHost has image data rather than an ID (meaning it is not
|
2012-07-13 23:38:09 +04:00
|
|
|
* using ImageBridge), then it just composites the image data normally.
|
|
|
|
*
|
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
|
|
|
* This means that there might be a possibility for the ImageBridge to send the first
|
|
|
|
* frame before the first layer transaction that will pass the container ID to the
|
|
|
|
* CompositableHost happens. In this (unlikely) case the layer is not composited
|
2012-07-13 23:38:09 +04:00
|
|
|
* until the layer transaction happens. This means this scenario is not harmful.
|
|
|
|
*
|
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
|
|
|
* Since sending an image through imageBridge triggers compositing, the main thread is
|
|
|
|
* not used at all (except for the very first transaction that provides the
|
|
|
|
* CompositableHost with an AsyncID).
|
2012-07-13 23:38:09 +04:00
|
|
|
*/
|
|
|
|
class ImageBridgeChild : public PImageBridgeChild
|
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
|
|
|
, public CompositableForwarder
|
2012-07-13 23:38:09 +04:00
|
|
|
{
|
|
|
|
friend class ImageContainer;
|
|
|
|
public:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates the image bridge with a dedicated thread for ImageBridgeChild.
|
|
|
|
*
|
|
|
|
* We may want to use a specifi thread in the future. In this case, use
|
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
|
|
|
* CreateWithThread instead.
|
2012-07-13 23:38:09 +04:00
|
|
|
*/
|
|
|
|
static void StartUp();
|
|
|
|
|
2012-08-29 16:24:48 +04:00
|
|
|
static PImageBridgeChild*
|
|
|
|
StartUpInChildProcess(Transport* aTransport, ProcessId aOtherProcess);
|
|
|
|
|
2012-07-13 23:38:09 +04:00
|
|
|
/**
|
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
|
|
|
* Destroys the image bridge by calling DestroyBridge, and destroys the
|
2012-07-13 23:38:09 +04:00
|
|
|
* ImageBridge's thread.
|
|
|
|
*
|
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
|
|
|
* If you don't want to destroy the thread, call DestroyBridge directly
|
2012-07-13 23:38:09 +04:00
|
|
|
* instead.
|
|
|
|
*/
|
|
|
|
static void ShutDown();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates the ImageBridgeChild manager protocol.
|
|
|
|
*/
|
|
|
|
static bool StartUpOnThread(base::Thread* aThread);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Destroys The ImageBridge protcol.
|
|
|
|
*
|
|
|
|
* The actual destruction happens synchronously on the ImageBridgeChild thread
|
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
|
|
|
* which means that if this function is called from another thread, the current
|
2012-07-13 23:38:09 +04:00
|
|
|
* thread will be paused until the destruction is done.
|
|
|
|
*/
|
|
|
|
static void DestroyBridge();
|
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
|
|
|
|
2012-07-13 23:38:09 +04:00
|
|
|
/**
|
|
|
|
* Returns true if the singleton has been created.
|
|
|
|
*
|
|
|
|
* Can be called from any thread.
|
|
|
|
*/
|
|
|
|
static bool IsCreated();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* returns the singleton instance.
|
|
|
|
*
|
|
|
|
* can be called from any thread.
|
|
|
|
*/
|
|
|
|
static ImageBridgeChild* GetSingleton();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Dispatches a task to the ImageBridgeChild thread to do the connection
|
|
|
|
*/
|
|
|
|
void ConnectAsync(ImageBridgeParent* aParent);
|
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
|
|
|
|
|
|
|
void BeginTransaction();
|
|
|
|
void EndTransaction();
|
|
|
|
|
2012-07-13 23:38:09 +04:00
|
|
|
/**
|
|
|
|
* Returns the ImageBridgeChild's thread.
|
|
|
|
*
|
|
|
|
* Can be called from any thread.
|
|
|
|
*/
|
|
|
|
base::Thread * GetThread() const;
|
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
|
|
|
|
2012-07-13 23:38:09 +04:00
|
|
|
/**
|
|
|
|
* Returns the ImageBridgeChild's message loop.
|
|
|
|
*
|
|
|
|
* Can be called from any thread.
|
|
|
|
*/
|
|
|
|
MessageLoop * GetMessageLoop() const;
|
|
|
|
|
2013-04-12 11:28:55 +04:00
|
|
|
PCompositableChild* AllocPCompositable(const TextureInfo& aInfo, uint64_t* aID) MOZ_OVERRIDE;
|
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
|
|
|
bool DeallocPCompositable(PCompositableChild* aActor) MOZ_OVERRIDE;
|
2012-07-13 23:38:09 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This must be called by the static function DeleteImageBridgeSync defined
|
|
|
|
* in ImageBridgeChild.cpp ONLY.
|
|
|
|
*/
|
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
|
|
|
~ImageBridgeChild();
|
2012-08-17 14:56:55 +04:00
|
|
|
|
|
|
|
virtual PGrallocBufferChild*
|
|
|
|
AllocPGrallocBuffer(const gfxIntSize&, const uint32_t&, const uint32_t&,
|
|
|
|
MaybeMagicGrallocBufferHandle*) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
DeallocPGrallocBuffer(PGrallocBufferChild* actor) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Allocate a gralloc SurfaceDescriptor remotely.
|
|
|
|
*/
|
|
|
|
bool
|
|
|
|
AllocSurfaceDescriptorGralloc(const gfxIntSize& aSize,
|
|
|
|
const uint32_t& aFormat,
|
|
|
|
const uint32_t& aUsage,
|
|
|
|
SurfaceDescriptor* aBuffer);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Part of the allocation of gralloc SurfaceDescriptor that is
|
|
|
|
* executed on the ImageBridgeChild thread after invoking
|
|
|
|
* AllocSurfaceDescriptorGralloc.
|
|
|
|
*
|
|
|
|
* Must be called from the ImageBridgeChild thread.
|
|
|
|
*/
|
|
|
|
bool
|
|
|
|
AllocSurfaceDescriptorGrallocNow(const gfxIntSize& aSize,
|
|
|
|
const uint32_t& aContent,
|
|
|
|
const uint32_t& aUsage,
|
|
|
|
SurfaceDescriptor* aBuffer);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Deallocate a remotely allocated gralloc buffer.
|
|
|
|
*/
|
|
|
|
bool
|
|
|
|
DeallocSurfaceDescriptorGralloc(const SurfaceDescriptor& aBuffer);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Part of the deallocation of gralloc SurfaceDescriptor that is
|
|
|
|
* executed on the ImageBridgeChild thread after invoking
|
|
|
|
* DeallocSurfaceDescriptorGralloc.
|
|
|
|
*
|
|
|
|
* Must be called from the ImageBridgeChild thread.
|
|
|
|
*/
|
|
|
|
bool
|
|
|
|
DeallocSurfaceDescriptorGrallocNow(const SurfaceDescriptor& aBuffer);
|
|
|
|
|
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
|
|
|
TemporaryRef<ImageClient> CreateImageClient(CompositableType aType);
|
|
|
|
TemporaryRef<ImageClient> CreateImageClientNow(CompositableType aType);
|
|
|
|
|
|
|
|
static void DispatchReleaseImageClient(ImageClient* aClient);
|
|
|
|
static void DispatchImageClientUpdate(ImageClient* aClient, ImageContainer* aContainer);
|
|
|
|
|
|
|
|
|
|
|
|
// CompositableForwarder
|
|
|
|
|
|
|
|
virtual void Connect(CompositableClient* aCompositable) MOZ_OVERRIDE;
|
2012-07-13 23:38:09 +04:00
|
|
|
|
2013-04-17 01:36:06 +04:00
|
|
|
virtual void PaintedTiledLayerBuffer(CompositableClient* aCompositable,
|
|
|
|
BasicTiledLayerBuffer* aTiledLayerBuffer) MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
NS_RUNTIMEABORT("should not be called");
|
|
|
|
}
|
|
|
|
|
2012-07-13 23:38:09 +04:00
|
|
|
/**
|
2013-04-12 11:28:55 +04:00
|
|
|
* Communicate to the compositor that the texture identified by aCompositable
|
|
|
|
* and aTextureId has been updated to aDescriptor.
|
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-04-12 11:28:55 +04:00
|
|
|
virtual void UpdateTexture(CompositableClient* aCompositable,
|
|
|
|
TextureIdentifier aTextureId,
|
|
|
|
SurfaceDescriptor* aDescriptor) MOZ_OVERRIDE;
|
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
|
|
|
|
|
|
|
/**
|
|
|
|
* Communicate the picture rect of a YUV image in aLayer to the compositor
|
|
|
|
*/
|
|
|
|
virtual void UpdatePictureRect(CompositableClient* aCompositable,
|
|
|
|
const nsIntRect& aRect) MOZ_OVERRIDE;
|
|
|
|
|
|
|
|
|
|
|
|
// at the moment we don't need to implement these. They are only used for
|
|
|
|
// thebes layers which don't support async updates.
|
|
|
|
virtual void CreatedSingleBuffer(CompositableClient* aCompositable,
|
2013-04-12 11:28:55 +04:00
|
|
|
const SurfaceDescriptor& aDescriptor,
|
|
|
|
const TextureInfo& aTextureInfo) MOZ_OVERRIDE {
|
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
|
|
|
NS_RUNTIMEABORT("should not be called");
|
|
|
|
}
|
|
|
|
virtual void CreatedDoubleBuffer(CompositableClient* aCompositable,
|
2013-04-12 11:28:55 +04:00
|
|
|
const SurfaceDescriptor& aFrontDescriptor,
|
|
|
|
const SurfaceDescriptor& aBackDescriptor,
|
|
|
|
const TextureInfo& aTextureInfo) MOZ_OVERRIDE {
|
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
|
|
|
NS_RUNTIMEABORT("should not be called");
|
|
|
|
}
|
|
|
|
virtual void DestroyThebesBuffer(CompositableClient* aCompositable) MOZ_OVERRIDE {
|
|
|
|
NS_RUNTIMEABORT("should not be called");
|
|
|
|
}
|
|
|
|
virtual void UpdateTextureRegion(CompositableClient* aCompositable,
|
|
|
|
const ThebesBufferData& aThebesBufferData,
|
|
|
|
const nsIntRegion& aUpdatedRegion) MOZ_OVERRIDE {
|
|
|
|
NS_RUNTIMEABORT("should not be called");
|
|
|
|
}
|
|
|
|
virtual void DestroyedThebesBuffer(const SurfaceDescriptor& aBackBufferToDestroy) MOZ_OVERRIDE
|
|
|
|
{
|
|
|
|
NS_RUNTIMEABORT("should not be called");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ISurfaceAllocator
|
|
|
|
|
|
|
|
/**
|
|
|
|
* See ISurfaceAllocator.h
|
|
|
|
* Can be used from any thread.
|
|
|
|
* If used outside the ImageBridgeChild thread, it will proxy a synchronous
|
|
|
|
* call on the ImageBridgeChild thread.
|
|
|
|
*/
|
|
|
|
virtual bool AllocUnsafeShmem(size_t aSize,
|
|
|
|
ipc::SharedMemory::SharedMemoryType aType,
|
|
|
|
ipc::Shmem* aShmem) MOZ_OVERRIDE;
|
|
|
|
/**
|
|
|
|
* See ISurfaceAllocator.h
|
|
|
|
* Can be used from any thread.
|
|
|
|
* If used outside the ImageBridgeChild thread, it will proxy a synchronous
|
|
|
|
* call on the ImageBridgeChild thread.
|
|
|
|
*/
|
|
|
|
virtual bool AllocShmem(size_t aSize,
|
|
|
|
ipc::SharedMemory::SharedMemoryType aType,
|
|
|
|
ipc::Shmem* aShmem) MOZ_OVERRIDE;
|
|
|
|
/**
|
|
|
|
* See ISurfaceAllocator.h
|
|
|
|
* Can be used from any thread.
|
|
|
|
* If used outside the ImageBridgeChild thread, it will proxy a synchronous
|
|
|
|
* call on the ImageBridgeChild thread.
|
|
|
|
*/
|
|
|
|
virtual void DeallocShmem(ipc::Shmem& aShmem);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
ImageBridgeChild();
|
|
|
|
bool DispatchAllocShmemInternal(size_t aSize,
|
|
|
|
SharedMemory::SharedMemoryType aType,
|
|
|
|
Shmem* aShmem,
|
|
|
|
bool aUnsafe);
|
|
|
|
|
|
|
|
CompositableTransaction* mTxn;
|
|
|
|
|
|
|
|
virtual PGrallocBufferChild* AllocGrallocBuffer(const gfxIntSize& aSize,
|
|
|
|
gfxASurface::gfxContentType aContent,
|
|
|
|
MaybeMagicGrallocBufferHandle* aHandle) MOZ_OVERRIDE;
|
2012-07-13 23:38:09 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // layers
|
|
|
|
} // mozilla
|
|
|
|
|
|
|
|
#endif
|