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 02:20:52 -07: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_BUFFERCLIENT_H
|
|
|
|
#define MOZILLA_GFX_BUFFERCLIENT_H
|
|
|
|
|
2013-08-11 16:17:23 -07:00
|
|
|
#include <stdint.h> // for uint64_t
|
|
|
|
#include <vector> // for vector
|
2013-09-12 07:50:28 -07:00
|
|
|
#include <map> // for map
|
2013-08-11 16:17:23 -07:00
|
|
|
#include "mozilla/Assertions.h" // for MOZ_CRASH
|
|
|
|
#include "mozilla/RefPtr.h" // for TemporaryRef, RefCounted
|
|
|
|
#include "mozilla/gfx/Types.h" // for SurfaceFormat
|
|
|
|
#include "mozilla/layers/CompositorTypes.h"
|
|
|
|
#include "mozilla/layers/LayersTypes.h" // for LayersBackend
|
|
|
|
#include "mozilla/layers/PCompositableChild.h" // for PCompositableChild
|
|
|
|
#include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc
|
2013-09-23 18:14:12 -07:00
|
|
|
#include "gfxASurface.h" // for gfxContentType
|
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 02:20:52 -07:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace layers {
|
|
|
|
|
|
|
|
class CompositableClient;
|
2013-07-08 14:30:44 -07:00
|
|
|
class DeprecatedTextureClient;
|
2013-07-30 02:59:51 -07:00
|
|
|
class TextureClient;
|
|
|
|
class BufferTextureClient;
|
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 02:20:52 -07:00
|
|
|
class ImageBridgeChild;
|
|
|
|
class CompositableForwarder;
|
|
|
|
class CompositableChild;
|
2013-06-05 15:14:51 -07:00
|
|
|
class SurfaceDescriptor;
|
2013-09-12 07:50:28 -07:00
|
|
|
class TextureClientData;
|
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 02:20:52 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* CompositableClient manages the texture-specific logic for composite layers,
|
2013-07-08 21:21:06 -07:00
|
|
|
* independently of the layer. It is the content side of a CompositableClient/
|
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 02:20:52 -07:00
|
|
|
* CompositableHost pair.
|
|
|
|
*
|
|
|
|
* CompositableClient's purpose is to send texture data to the compositor side
|
|
|
|
* along with any extra information about how the texture is to be composited.
|
|
|
|
* Things like opacity or transformation belong to layer and not compositable.
|
|
|
|
*
|
|
|
|
* Since Compositables are independent of layers it is possible to create one,
|
|
|
|
* connect it to the compositor side, and start sending images to it. This alone
|
|
|
|
* is arguably not very useful, but it means that as long as a shadow layer can
|
|
|
|
* do the proper magic to find a reference to the right CompositableHost on the
|
|
|
|
* Compositor side, a Compositable client can be used outside of the main
|
|
|
|
* shadow layer forwarder machinery that is used on the main thread.
|
|
|
|
*
|
|
|
|
* The first step is to create a Compositable client and call Connect().
|
|
|
|
* Connect() creates the underlying IPDL actor (see CompositableChild) and the
|
|
|
|
* corresponding CompositableHost on the other side.
|
|
|
|
*
|
|
|
|
* To do in-transaction texture transfer (the default), call
|
|
|
|
* ShadowLayerForwarder::Attach(CompositableClient*, ShadowableLayer*). This
|
2013-04-25 15:25:33 -07:00
|
|
|
* will let the LayerComposite on the compositor side know which CompositableHost
|
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 02:20:52 -07:00
|
|
|
* to use for compositing.
|
|
|
|
*
|
|
|
|
* To do async texture transfer (like async-video), the CompositableClient
|
|
|
|
* should be created with a different CompositableForwarder (like
|
|
|
|
* ImageBridgeChild) and attachment is done with
|
|
|
|
* CompositableForwarder::AttachAsyncCompositable that takes an identifier
|
|
|
|
* instead of a CompositableChild, since the CompositableClient is not managed
|
|
|
|
* by this layer forwarder (the matching uses a global map on the compositor side,
|
|
|
|
* see CompositableMap in ImageBridgeParent.cpp)
|
|
|
|
*
|
|
|
|
* Subclasses: Thebes layers use ContentClients, ImageLayers use ImageClients,
|
|
|
|
* Canvas layers use CanvasClients (but ImageHosts). We have a different subclass
|
|
|
|
* where we have a different way of interfacing with the textures - in terms of
|
|
|
|
* drawing into the compositable and/or passing its contents to the compostior.
|
|
|
|
*/
|
2013-08-27 08:03:58 -07:00
|
|
|
class CompositableClient : public AtomicRefCounted<CompositableClient>
|
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 02:20:52 -07:00
|
|
|
{
|
|
|
|
public:
|
2013-07-30 02:59:51 -07:00
|
|
|
CompositableClient(CompositableForwarder* aForwarder);
|
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 02:20:52 -07:00
|
|
|
|
|
|
|
virtual ~CompositableClient();
|
|
|
|
|
2013-07-30 02:59:51 -07:00
|
|
|
virtual TextureInfo GetTextureInfo() const = 0;
|
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 02:20:52 -07:00
|
|
|
|
|
|
|
LayersBackend GetCompositorBackendType() const;
|
|
|
|
|
2013-07-08 14:30:44 -07:00
|
|
|
TemporaryRef<DeprecatedTextureClient>
|
2013-09-23 18:14:12 -07:00
|
|
|
CreateDeprecatedTextureClient(DeprecatedTextureClientType aDeprecatedTextureClientType,
|
2013-09-24 13:45:13 -07:00
|
|
|
gfxContentType aContentType = GFX_CONTENT_SENTINEL);
|
2013-04-12 00:28:55 -07:00
|
|
|
|
2013-08-27 13:16:03 -07:00
|
|
|
virtual TemporaryRef<BufferTextureClient>
|
2013-10-13 17:24:12 -07:00
|
|
|
CreateBufferTextureClient(gfx::SurfaceFormat aFormat,
|
|
|
|
TextureFlags aFlags = TEXTURE_FLAGS_DEFAULT);
|
2013-07-30 02:59:51 -07:00
|
|
|
|
2013-04-12 00:28:55 -07:00
|
|
|
virtual void SetDescriptorFromReply(TextureIdentifier aTextureId,
|
|
|
|
const SurfaceDescriptor& aDescriptor)
|
|
|
|
{
|
2013-06-28 18:38:30 -07:00
|
|
|
MOZ_CRASH("If you want to call this, you should have implemented it");
|
2013-04-12 00:28:55 -07: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 02:20:52 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Establishes the connection with compositor side through IPDL
|
|
|
|
*/
|
|
|
|
virtual bool Connect();
|
|
|
|
|
|
|
|
void Destroy();
|
|
|
|
|
|
|
|
CompositableChild* GetIPDLActor() const;
|
|
|
|
|
|
|
|
// should only be called by a CompositableForwarder
|
2013-08-20 18:27:05 -07:00
|
|
|
virtual void SetIPDLActor(CompositableChild* aChild);
|
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 02:20:52 -07:00
|
|
|
|
|
|
|
CompositableForwarder* GetForwarder() const
|
|
|
|
{
|
|
|
|
return mForwarder;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This identifier is what lets us attach async compositables with a shadow
|
2013-09-30 05:42:47 -07:00
|
|
|
* layer. It is not used if the compositable is used with the regular shadow
|
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 02:20:52 -07:00
|
|
|
* layer forwarder.
|
2013-09-30 05:42:47 -07:00
|
|
|
*
|
|
|
|
* If this returns zero, it means the compositable is not async (it is used
|
|
|
|
* 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 02:20:52 -07:00
|
|
|
*/
|
|
|
|
uint64_t GetAsyncID() const;
|
|
|
|
|
2013-07-30 02:59:51 -07:00
|
|
|
/**
|
|
|
|
* Tells the Compositor to create a TextureHost for this TextureClient.
|
|
|
|
*/
|
2013-10-09 16:18:29 -07:00
|
|
|
virtual bool AddTextureClient(TextureClient* aClient);
|
2013-07-30 02:59:51 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Tells the Compositor to delete the TextureHost corresponding to this
|
|
|
|
* TextureClient.
|
|
|
|
*/
|
|
|
|
virtual void RemoveTextureClient(TextureClient* aClient);
|
|
|
|
|
|
|
|
/**
|
2013-08-08 05:53:12 -07:00
|
|
|
* A hook for the Compositable to execute whatever it held off for next transaction.
|
2013-07-30 02:59:51 -07:00
|
|
|
*/
|
|
|
|
virtual void OnTransaction();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A hook for the when the Compositable is detached from it's layer.
|
|
|
|
*/
|
2013-08-08 05:53:12 -07:00
|
|
|
virtual void OnDetach() {}
|
2013-07-30 02:59:51 -07:00
|
|
|
|
2013-09-30 05:42:47 -07:00
|
|
|
/**
|
|
|
|
* When texture deallocation must happen on the client side, we need to first
|
|
|
|
* ensure that the compositor has already let go of the data in order
|
|
|
|
* to safely deallocate it.
|
|
|
|
*
|
|
|
|
* This is implemented by registering a callback to postpone deallocation or
|
|
|
|
* recycling of the shared data.
|
|
|
|
*
|
|
|
|
* This hook is called when the compositor notifies the client that it is not
|
|
|
|
* holding any more references to the shared data so that this compositable
|
|
|
|
* can run the corresponding callback.
|
|
|
|
*/
|
2013-09-12 07:50:28 -07:00
|
|
|
void OnReplyTextureRemoved(uint64_t aTextureID);
|
|
|
|
|
2013-09-30 05:42:47 -07:00
|
|
|
/**
|
|
|
|
* Run all he registered callbacks (see the comment for OnReplyTextureRemoved).
|
|
|
|
* Only call this if you know what you are doing.
|
|
|
|
*/
|
2013-09-12 07:50:35 -07:00
|
|
|
void FlushTexturesToRemoveCallbacks();
|
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 02:20:52 -07:00
|
|
|
protected:
|
2013-09-12 07:50:28 -07:00
|
|
|
struct TextureIDAndFlags {
|
|
|
|
TextureIDAndFlags(uint64_t aID, TextureFlags aFlags)
|
|
|
|
: mID(aID), mFlags(aFlags) {}
|
|
|
|
uint64_t mID;
|
|
|
|
TextureFlags mFlags;
|
|
|
|
};
|
2013-07-30 02:59:51 -07:00
|
|
|
// The textures to destroy in the next transaction;
|
2013-09-12 07:50:28 -07:00
|
|
|
nsTArray<TextureIDAndFlags> mTexturesToRemove;
|
|
|
|
std::map<uint64_t, TextureClientData*> mTexturesToRemoveCallbacks;
|
2013-07-30 02:59:51 -07:00
|
|
|
uint64_t mNextTextureID;
|
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 02:20:52 -07:00
|
|
|
CompositableChild* mCompositableChild;
|
|
|
|
CompositableForwarder* mForwarder;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* IPDL actor used by CompositableClient to match with its corresponding
|
|
|
|
* CompositableHost on the compositor side.
|
|
|
|
*
|
|
|
|
* CompositableChild is owned by a CompositableClient.
|
|
|
|
*/
|
|
|
|
class CompositableChild : public PCompositableChild
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CompositableChild()
|
|
|
|
: mCompositableClient(nullptr), mID(0)
|
|
|
|
{
|
|
|
|
MOZ_COUNT_CTOR(CompositableChild);
|
|
|
|
}
|
|
|
|
~CompositableChild()
|
|
|
|
{
|
|
|
|
MOZ_COUNT_DTOR(CompositableChild);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Destroy();
|
|
|
|
|
|
|
|
void SetClient(CompositableClient* aClient)
|
|
|
|
{
|
|
|
|
mCompositableClient = aClient;
|
|
|
|
}
|
|
|
|
|
|
|
|
CompositableClient* GetCompositableClient() const
|
|
|
|
{
|
|
|
|
return mCompositableClient;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SetAsyncID(uint64_t aID) { mID = aID; }
|
|
|
|
uint64_t GetAsyncID() const
|
|
|
|
{
|
|
|
|
return mID;
|
|
|
|
}
|
|
|
|
private:
|
|
|
|
CompositableClient* mCompositableClient;
|
|
|
|
uint64_t mID;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
#endif
|