2010-08-20 16:24:41 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
* vim: sw=2 ts=8 et :
|
|
|
|
*/
|
2012-05-21 04:12:37 -07: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-08-20 16:24:41 -07:00
|
|
|
|
|
|
|
#include "ShadowLayerChild.h"
|
|
|
|
#include "ShadowLayersChild.h"
|
2012-07-12 05:51:58 -07:00
|
|
|
#include "ShadowLayerUtils.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 02:20:52 -07:00
|
|
|
#include "mozilla/layers/CompositableClient.h"
|
2010-08-20 16:24:41 -07:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace layers {
|
|
|
|
|
|
|
|
void
|
|
|
|
ShadowLayersChild::Destroy()
|
|
|
|
{
|
|
|
|
NS_ABORT_IF_FALSE(0 == ManagedPLayerChild().Length(),
|
|
|
|
"layers should have been cleaned up by now");
|
2010-08-20 16:24:41 -07:00
|
|
|
PLayersChild::Send__delete__(this);
|
2010-08-20 16:24:41 -07:00
|
|
|
// WARNING: |this| has gone to the great heap in the sky
|
|
|
|
}
|
|
|
|
|
2012-07-12 05:51:58 -07:00
|
|
|
PGrallocBufferChild*
|
|
|
|
ShadowLayersChild::AllocPGrallocBuffer(const gfxIntSize&,
|
|
|
|
const gfxContentType&,
|
|
|
|
MaybeMagicGrallocBufferHandle*)
|
|
|
|
{
|
|
|
|
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
|
|
|
|
return GrallocBufferActor::Create();
|
|
|
|
#else
|
|
|
|
NS_RUNTIMEABORT("No gralloc buffers for you");
|
2012-07-30 07:20:58 -07:00
|
|
|
return nullptr;
|
2012-07-12 05:51:58 -07:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
ShadowLayersChild::DeallocPGrallocBuffer(PGrallocBufferChild* actor)
|
|
|
|
{
|
|
|
|
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
|
|
|
|
delete actor;
|
|
|
|
return true;
|
|
|
|
#else
|
|
|
|
NS_RUNTIMEABORT("Um, how did we get here?");
|
|
|
|
return false;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2010-08-20 16:24:41 -07:00
|
|
|
PLayerChild*
|
|
|
|
ShadowLayersChild::AllocPLayer()
|
|
|
|
{
|
|
|
|
// we always use the "power-user" ctor
|
|
|
|
NS_RUNTIMEABORT("not reached");
|
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
|
|
|
return nullptr;
|
2010-08-20 16:24:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
ShadowLayersChild::DeallocPLayer(PLayerChild* actor)
|
|
|
|
{
|
|
|
|
delete actor;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
PCompositableChild*
|
|
|
|
ShadowLayersChild::AllocPCompositable(const CompositableType& aType)
|
|
|
|
{
|
|
|
|
return new CompositableChild();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
ShadowLayersChild::DeallocPCompositable(PCompositableChild* actor)
|
|
|
|
{
|
|
|
|
delete actor;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2010-08-20 16:24:41 -07:00
|
|
|
} // namespace layers
|
|
|
|
} // namespace mozilla
|