2010-07-21 21:17:33 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
* vim: sw=2 ts=8 et :
|
|
|
|
*/
|
2012-05-21 11:12:37 +00: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-21 21:17:33 +00:00
|
|
|
|
2013-04-24 18:42:40 +00:00
|
|
|
#ifndef MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H
|
|
|
|
#define MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H
|
2010-07-21 21:17:33 +00:00
|
|
|
|
2013-08-11 23:17:23 +00:00
|
|
|
#include <stdint.h> // for uint32_t
|
|
|
|
#include "mozilla/Attributes.h" // for MOZ_OVERRIDE
|
|
|
|
#include "mozilla/ipc/ProtocolUtils.h"
|
2013-04-24 18:42:40 +00:00
|
|
|
#include "mozilla/layers/PLayerTransactionChild.h"
|
2013-11-27 15:18:38 +00:00
|
|
|
#include "mozilla/RefPtr.h"
|
2010-07-21 21:17:33 +00:00
|
|
|
|
|
|
|
namespace mozilla {
|
2013-11-27 15:18:38 +00:00
|
|
|
|
|
|
|
namespace layout {
|
|
|
|
class RenderFrameChild;
|
|
|
|
}
|
|
|
|
|
2010-07-21 21:17:33 +00:00
|
|
|
namespace layers {
|
|
|
|
|
2013-04-24 18:42:40 +00:00
|
|
|
class LayerTransactionChild : public PLayerTransactionChild
|
2010-07-21 21:17:33 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-04-14 19:04:25 +00:00
|
|
|
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(LayerTransactionChild)
|
2010-08-20 23:24:41 +00: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-21 21:17:33 +00:00
|
|
|
|
2013-11-27 15:18:38 +00:00
|
|
|
bool IPCOpen() const { return mIPCOpen; }
|
|
|
|
|
2010-08-20 23:24:41 +00:00
|
|
|
protected:
|
2013-11-27 15:18:38 +00:00
|
|
|
LayerTransactionChild()
|
|
|
|
: mIPCOpen(false)
|
|
|
|
{}
|
|
|
|
~LayerTransactionChild() { }
|
|
|
|
|
2013-07-08 15:48:39 +00: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 09:20:52 +00:00
|
|
|
|
2013-07-08 15:48:39 +00:00
|
|
|
virtual PCompositableChild* AllocPCompositableChild(const TextureInfo& aInfo) MOZ_OVERRIDE;
|
|
|
|
virtual bool DeallocPCompositableChild(PCompositableChild* actor) MOZ_OVERRIDE;
|
2013-12-12 01:44:44 +00:00
|
|
|
|
2014-01-21 22:06:18 +00:00
|
|
|
virtual PTextureChild* AllocPTextureChild(const SurfaceDescriptor& aSharedData,
|
|
|
|
const TextureFlags& aFlags) MOZ_OVERRIDE;
|
2013-12-12 01:44:44 +00:00
|
|
|
virtual bool DeallocPTextureChild(PTextureChild* actor) MOZ_OVERRIDE;
|
|
|
|
|
2013-04-12 20:25:04 +00:00
|
|
|
virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
|
2013-11-27 15:18:38 +00: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-21 21:17:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace layers
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2013-04-24 18:42:40 +00:00
|
|
|
#endif // MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H
|