2010-07-22 01:17:33 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
* vim: sw=2 ts=8 et :
|
|
|
|
*/
|
2012-05-21 15:12:37 +04:00
|
|
|
/* 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/. */
|
2010-07-22 01:17:33 +04:00
|
|
|
|
2013-04-24 22:42:40 +04:00
|
|
|
#ifndef MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H
|
|
|
|
#define MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H
|
2010-07-22 01:17:33 +04:00
|
|
|
|
2013-08-12 03:17:23 +04:00
|
|
|
#include <stdint.h> // for uint32_t
|
|
|
|
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE
|
|
|
|
#include "mozilla/ipc/ProtocolUtils.h"
|
2013-04-24 22:42:40 +04:00
|
|
|
#include "mozilla/layers/PLayerTransactionChild.h"
|
2013-11-27 19:18:38 +04:00
|
|
|
#include "mozilla/RefPtr.h"
|
2010-07-22 01:17:33 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
2013-11-27 19:18:38 +04:00
|
|
|
|
|
|
|
namespace layout {
|
|
|
|
class RenderFrameChild;
|
|
|
|
}
|
|
|
|
|
2010-07-22 01:17:33 +04:00
|
|
|
namespace layers {
|
|
|
|
|
2013-04-24 22:42:40 +04:00
|
|
|
class LayerTransactionChild : public PLayerTransactionChild
|
2013-11-27 19:18:38 +04:00
|
|
|
, public AtomicRefCounted<LayerTransactionChild>
|
2010-07-22 01:17:33 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-02-21 06:33:49 +04:00
|
|
|
MOZ_DECLARE_REFCOUNTED_TYPENAME(LayerTransactionChild)
|
2010-08-21 03:24:41 +04:00
|
|
|
/**
|
|
|
|
* Clean this up, finishing with Send__delete__().
|
|
|
|
*
|
|
|
|
* It is expected (checked with an assert) that all shadow layers
|
|
|
|
* created by this have already been destroyed and
|
|
|
|
* Send__delete__()d by the time this method is called.
|
|
|
|
*/
|
|
|
|
void Destroy();
|
2010-07-22 01:17:33 +04:00
|
|
|
|
2013-11-27 19:18:38 +04:00
|
|
|
bool IPCOpen() const { return mIPCOpen; }
|
|
|
|
|
2010-08-21 03:24:41 +04:00
|
|
|
protected:
|
2013-11-27 19:18:38 +04:00
|
|
|
LayerTransactionChild()
|
|
|
|
: mIPCOpen(false)
|
|
|
|
{}
|
|
|
|
~LayerTransactionChild() { }
|
|
|
|
friend class AtomicRefCounted<LayerTransactionChild>;
|
|
|
|
friend class detail::RefCounted<LayerTransactionChild, detail::AtomicRefCount>;
|
|
|
|
|
2012-07-12 16:51:58 +04:00
|
|
|
virtual PGrallocBufferChild*
|
2013-12-20 20:46:29 +04:00
|
|
|
AllocPGrallocBufferChild(const IntSize&,
|
|
|
|
const uint32_t&, const uint32_t&,
|
|
|
|
MaybeMagicGrallocBufferHandle*) MOZ_OVERRIDE;
|
2012-07-12 16:51:58 +04:00
|
|
|
virtual bool
|
2013-07-08 19:48:39 +04:00
|
|
|
DeallocPGrallocBufferChild(PGrallocBufferChild* actor) 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
|
|
|
|
2013-07-08 19:48:39 +04:00
|
|
|
virtual PLayerChild* AllocPLayerChild() MOZ_OVERRIDE;
|
|
|
|
virtual bool DeallocPLayerChild(PLayerChild* actor) 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
|
|
|
|
2013-07-08 19:48:39 +04:00
|
|
|
virtual PCompositableChild* AllocPCompositableChild(const TextureInfo& aInfo) MOZ_OVERRIDE;
|
|
|
|
virtual bool DeallocPCompositableChild(PCompositableChild* actor) MOZ_OVERRIDE;
|
2013-12-12 05:44:44 +04:00
|
|
|
|
2014-01-22 02:06:18 +04:00
|
|
|
virtual PTextureChild* AllocPTextureChild(const SurfaceDescriptor& aSharedData,
|
|
|
|
const TextureFlags& aFlags) MOZ_OVERRIDE;
|
2013-12-12 05:44:44 +04:00
|
|
|
virtual bool DeallocPTextureChild(PTextureChild* actor) MOZ_OVERRIDE;
|
|
|
|
|
2013-04-13 00:25:04 +04:00
|
|
|
virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
|
2013-11-27 19:18:38 +04:00
|
|
|
|
|
|
|
void AddIPDLReference() {
|
|
|
|
MOZ_ASSERT(mIPCOpen == false);
|
|
|
|
mIPCOpen = true;
|
|
|
|
AddRef();
|
|
|
|
}
|
|
|
|
void ReleaseIPDLReference() {
|
|
|
|
MOZ_ASSERT(mIPCOpen == true);
|
|
|
|
mIPCOpen = false;
|
|
|
|
Release();
|
|
|
|
}
|
|
|
|
friend class CompositorChild;
|
|
|
|
friend class layout::RenderFrameChild;
|
|
|
|
|
|
|
|
bool mIPCOpen;
|
2010-07-22 01:17:33 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace layers
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2013-04-24 22:42:40 +04:00
|
|
|
#endif // MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H
|