Bug 863324 - Rename PLayers into PLayerTransaction, r=jrmuizel

--HG--
rename : gfx/layers/ipc/ShadowLayersChild.cpp => gfx/layers/ipc/LayerTransactionChild.cpp
rename : gfx/layers/ipc/ShadowLayersChild.h => gfx/layers/ipc/LayerTransactionChild.h
rename : gfx/layers/ipc/ShadowLayersParent.cpp => gfx/layers/ipc/LayerTransactionParent.cpp
rename : gfx/layers/ipc/ShadowLayersParent.h => gfx/layers/ipc/LayerTransactionParent.h
rename : gfx/layers/ipc/PLayers.ipdl => gfx/layers/ipc/PLayerTransaction.ipdl
This commit is contained in:
Nicolas Silva 2013-04-24 14:42:40 -04:00
parent 846945f3f9
commit a1ee3bf807
81 changed files with 260 additions and 245 deletions

View File

@ -21,7 +21,7 @@
#include "mozilla/ipc/FileDescriptorUtils.h"
#include "mozilla/layers/AsyncPanZoomController.h"
#include "mozilla/layers/CompositorChild.h"
#include "mozilla/layers/PLayersChild.h"
#include "mozilla/layers/PLayerTransactionChild.h"
#include "mozilla/layout/RenderFrameChild.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/unused.h"
@ -2095,7 +2095,7 @@ TabChild::InitRenderingState()
return false;
}
PLayersChild* shadowManager = nullptr;
PLayerTransactionChild* shadowManager = nullptr;
if (id != 0) {
// Pushing layers transactions directly to a separate
// compositor context.
@ -2105,11 +2105,11 @@ TabChild::InitRenderingState()
return false;
}
shadowManager =
compositorChild->SendPLayersConstructor(textureFactoryIdentifier.mParentBackend,
id, &textureFactoryIdentifier);
compositorChild->SendPLayerTransactionConstructor(textureFactoryIdentifier.mParentBackend,
id, &textureFactoryIdentifier);
} else {
// Pushing transactions to the parent content.
shadowManager = remoteFrame->SendPLayersConstructor();
shadowManager = remoteFrame->SendPLayerTransactionConstructor();
}
if (!shadowManager) {

View File

@ -5,7 +5,7 @@
#include "base/basictypes.h"
/* This must occur *after* layers/PLayers.h to avoid typedefs conflicts. */
/* This must occur *after* layers/PLayerTransaction.h to avoid typedefs conflicts. */
#include "mozilla/Util.h"
#include "prmem.h"

View File

@ -7,7 +7,7 @@
#include "mozilla/DebugOnly.h"
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "mozilla/layers/ShadowLayers.h"
#include "mozilla/Telemetry.h"

View File

@ -114,9 +114,9 @@ CPPSRCS += \
ImageBridgeParent.cpp \
ShadowLayers.cpp \
ShadowLayerChild.cpp \
ShadowLayersChild.cpp \
ShadowLayerParent.cpp \
ShadowLayersParent.cpp \
LayerTransactionChild.cpp \
LayerTransactionParent.cpp \
SharedPlanarYCbCrImage.cpp \
ShmemYCbCrImage.cpp \
SharedRGBImage.cpp \

View File

@ -3,7 +3,7 @@
* 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/. */
#include "mozilla/layers/PLayersParent.h"
#include "mozilla/layers/PLayerTransactionParent.h"
#include "BasicCanvasLayer.h"
#include "gfxImageSurface.h"
#include "GLContext.h"

View File

@ -3,7 +3,7 @@
* 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/. */
#include "mozilla/layers/PLayersParent.h"
#include "mozilla/layers/PLayerTransactionParent.h"
#include "BasicLayersImpl.h"
using namespace mozilla::gfx;

View File

@ -3,7 +3,7 @@
* 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/. */
#include "mozilla/layers/PLayersParent.h"
#include "mozilla/layers/PLayerTransactionParent.h"
#include "BasicLayersImpl.h"
#include "SharedTextureImage.h"
#include "gfxUtils.h"

View File

@ -6,8 +6,8 @@
#include "mozilla/dom/TabChild.h"
#include "mozilla/Hal.h"
#include "mozilla/layers/PLayerChild.h"
#include "mozilla/layers/PLayersChild.h"
#include "mozilla/layers/PLayersParent.h"
#include "mozilla/layers/PLayerTransactionChild.h"
#include "mozilla/layers/PLayerTransactionParent.h"
#include "gfxSharedImageSurface.h"
#include "gfxImageSurface.h"
@ -1333,7 +1333,7 @@ void
BasicShadowLayerManager::ClearCachedResources(Layer* aSubtree)
{
MOZ_ASSERT(!HasShadowManager() || !aSubtree);
if (PLayersChild* manager = GetShadowManager()) {
if (PLayerTransactionChild* manager = GetShadowManager()) {
manager->SendClearCachedResources();
}
BasicLayerManager::ClearCachedResources(aSubtree);

View File

@ -183,7 +183,7 @@ protected:
nsRefPtr<gfxContext> mTarget;
// When we're doing a transaction in order to draw to a non-default
// target, the layers transaction is only performed in order to send
// a PLayers:Update. We save the original non-default target to
// a PLayerTransaction:Update. We save the original non-default target to
// mShadowTarget, and then perform the transaction using
// mDummyTarget as the render target. After the transaction ends,
// we send a message to our remote side to capture the actual pixels

View File

@ -6,7 +6,7 @@
#include "mozilla/DebugOnly.h"
#include "BasicLayersImpl.h"
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
using namespace mozilla::gfx;

View File

@ -6,7 +6,7 @@
#ifndef GFX_BASICTHEBESLAYER_H
#define GFX_BASICTHEBESLAYER_H
#include "mozilla/layers/PLayersParent.h"
#include "mozilla/layers/PLayerTransactionParent.h"
#include "BasicLayersImpl.h"
#include "mozilla/layers/ContentClient.h"

View File

@ -2,7 +2,7 @@
* 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/. */
#include "mozilla/layers/PLayersChild.h"
#include "mozilla/layers/PLayerTransactionChild.h"
#include "BasicTiledThebesLayer.h"
#include "gfxImageSurface.h"
#include "GeckoProfiler.h"

View File

@ -6,7 +6,7 @@
#include "mozilla/layers/CompositableClient.h"
#include "mozilla/layers/TextureClient.h"
#include "mozilla/layers/TextureClientOGL.h"
#include "mozilla/layers/ShadowLayersChild.h"
#include "mozilla/layers/LayerTransactionChild.h"
#include "mozilla/layers/CompositableForwarder.h"
namespace mozilla {

View File

@ -16,7 +16,6 @@ namespace layers {
class CompositableChild;
class CompositableClient;
class TextureClient;
class ShadowLayersChild;
class ImageBridgeChild;
class ShadowableLayer;
class CompositableForwarder;

View File

@ -4,7 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "ipc/AutoOpenSurface.h"
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "mozilla/layers/ShadowLayers.h"
#include "mozilla/layers/CompositorTypes.h" // for TextureInfo
#include "mozilla/layers/Effects.h"

View File

@ -6,7 +6,7 @@
#ifndef GFX_ColorLayerComposite_H
#define GFX_ColorLayerComposite_H
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "mozilla/layers/ShadowLayers.h"
#include "LayerManagerComposite.h"

View File

@ -233,12 +233,12 @@ private:
* the layer.
*
* CompositableMap must be global because the image bridge doesn't have any
* reference to whatever we have created with PLayers. So, the only way to
* reference to whatever we have created with PLayerTransaction. So, the only way to
* actually connect these two worlds is to have something global that they can
* both query (in the same thread). The map is not allocated the map on the
* stack to avoid the badness of static initialization.
*
* Also, we have a compositor/PLayers protocol/etc. per layer manager, and the
* Also, we have a compositor/PLayerTransaction protocol/etc. per layer manager, and the
* ImageBridge is used by all the existing compositors that have a video, so
* there isn't an instance or "something" that lives outside the boudaries of a
* given layer manager on the compositor thread except the image bridge and the

View File

@ -6,7 +6,7 @@
#ifndef GFX_ContainerLayerComposite_H
#define GFX_ContainerLayerComposite_H
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "mozilla/layers/ShadowLayers.h"
#include "Layers.h"

View File

@ -6,7 +6,7 @@
#ifndef GFX_ImageLayerComposite_H
#define GFX_ImageLayerComposite_H
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "mozilla/layers/ShadowLayers.h"
#include "LayerManagerComposite.h"

View File

@ -3,9 +3,10 @@
* 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/. */
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
/* This must occur *after* layers/PLayers.h to avoid typedefs conflicts. */
// This must occur *after* layers/PLayerTransaction.h to avoid
// typedefs conflicts.
#include "mozilla/Util.h"
#include "LayerManagerComposite.h"

View File

@ -17,6 +17,14 @@
#include "gfxContext.h"
#include "gfx3DMatrix.h"
#include "GLDefs.h"
namespace mozilla {
namespace gl {
class GLContext;
class TextureImage;
}
}
namespace mozilla {
namespace layers {

View File

@ -4,10 +4,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "ipc/AutoOpenSurface.h"
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "TiledLayerBuffer.h"
/* This must occur *after* layers/PLayers.h to avoid typedefs conflicts. */
// This must occur *after* layers/PLayerTransaction.h to avoid
// typedefs conflicts.
#include "mozilla/Util.h"
#include "mozilla/layers/ShadowLayers.h"

View File

@ -6,7 +6,7 @@
#ifndef GFX_ThebesLayerComposite_H
#define GFX_ThebesLayerComposite_H
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "mozilla/layers/ShadowLayers.h"
#include "Layers.h"

View File

@ -3,9 +3,10 @@
* 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/. */
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
/* This must occur *after* layers/PLayers.h to avoid typedefs conflicts. */
// This must occur *after* layers/PLayerTransaction.h to avoid
// typedefs conflicts.
#include "mozilla/Util.h"
#include "ThebesLayerD3D10.h"

View File

@ -5,7 +5,7 @@
#include "ipc/AutoOpenSurface.h"
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "gfxImageSurface.h"
#include "gfxWindowsSurface.h"

View File

@ -4,7 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "ipc/AutoOpenSurface.h"
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "gfxSharedImageSurface.h"
#include "ImageLayerD3D9.h"

View File

@ -3,9 +3,10 @@
* 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/. */
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
/* This must occur *after* layers/PLayers.h to avoid typedefs conflicts. */
// This must occur *after* layers/PLayerTransaction.h to avoid
// typedefs conflicts.
#include "mozilla/Util.h"
#include "ipc/AutoOpenSurface.h"

View File

@ -11,7 +11,7 @@
#include "base/basictypes.h"
#include "gfxASurface.h"
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "ShadowLayers.h"
namespace mozilla {

View File

@ -7,9 +7,9 @@
#include "CompositorChild.h"
#include "CompositorParent.h"
#include "LayerManagerOGL.h"
#include "mozilla/layers/ShadowLayersChild.h"
#include "mozilla/layers/LayerTransactionChild.h"
using mozilla::layers::ShadowLayersChild;
using mozilla::layers::LayerTransactionChild;
namespace mozilla {
namespace layers {
@ -32,9 +32,9 @@ CompositorChild::Destroy()
{
mLayerManager->Destroy();
mLayerManager = NULL;
while (size_t len = ManagedPLayersChild().Length()) {
ShadowLayersChild* layers =
static_cast<ShadowLayersChild*>(ManagedPLayersChild()[len - 1]);
while (size_t len = ManagedPLayerTransactionChild().Length()) {
LayerTransactionChild* layers =
static_cast<LayerTransactionChild*>(ManagedPLayerTransactionChild()[len - 1]);
layers->Destroy();
}
SendStop();
@ -70,16 +70,16 @@ CompositorChild::Get()
return sCompositor;
}
PLayersChild*
CompositorChild::AllocPLayers(const LayersBackend& aBackendHint,
const uint64_t& aId,
TextureFactoryIdentifier* aTextureFactoryIdentifier)
PLayerTransactionChild*
CompositorChild::AllocPLayerTransaction(const LayersBackend& aBackendHint,
const uint64_t& aId,
TextureFactoryIdentifier*)
{
return new ShadowLayersChild();
return new LayerTransactionChild();
}
bool
CompositorChild::DeallocPLayers(PLayersChild* actor)
CompositorChild::DeallocPLayerTransaction(PLayerTransactionChild* actor)
{
delete actor;
return true;

View File

@ -38,10 +38,12 @@ public:
static bool ChildProcessHasCompositor() { return sCompositor != nullptr; }
protected:
virtual PLayersChild* AllocPLayers(const LayersBackend& aBackendHint,
const uint64_t& aId,
TextureFactoryIdentifier* aTextureFactoryIdentifier) MOZ_OVERRIDE;
virtual bool DeallocPLayers(PLayersChild *aChild) MOZ_OVERRIDE;
virtual PLayerTransactionChild*
AllocPLayerTransaction(const LayersBackend& aBackendHint,
const uint64_t& aId,
TextureFactoryIdentifier* aTextureFactoryIdentifier) MOZ_OVERRIDE;
virtual bool DeallocPLayerTransaction(PLayerTransactionChild *aChild) MOZ_OVERRIDE;
virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;

View File

@ -24,7 +24,7 @@
#include "nsGkAtoms.h"
#include "nsIWidget.h"
#include "RenderTrace.h"
#include "ShadowLayersParent.h"
#include "LayerTransactionParent.h"
#include "BasicLayers.h"
#include "nsIWidget.h"
#include "nsGkAtoms.h"
@ -207,8 +207,8 @@ CompositorParent::~CompositorParent()
void
CompositorParent::Destroy()
{
NS_ABORT_IF_FALSE(ManagedPLayersParent().Length() == 0,
"CompositorParent destroyed before managed PLayersParent");
NS_ABORT_IF_FALSE(ManagedPLayerTransactionParent().Length() == 0,
"CompositorParent destroyed before managed PLayerTransactionParent");
// Ensure that the layer manager is destructed on the compositor thread.
mLayerManager = NULL;
@ -688,7 +688,7 @@ CompositorParent::TransformFixedLayers(Layer* aLayer,
static void
SetShadowProperties(Layer* aLayer)
{
// FIXME: Bug 717688 -- Do these updates in ShadowLayersParent::RecvUpdate.
// FIXME: Bug 717688 -- Do these updates in LayerTransactionParent::RecvUpdate.
ShadowLayer* shadow = aLayer->AsShadowLayer();
// Set the shadow's base transform to the layer's base transform.
shadow->SetShadowTransform(aLayer->GetBaseTransform());
@ -1037,7 +1037,7 @@ CompositorParent::TransformShadowTree(TimeStamp aCurrentFrame)
}
void
CompositorParent::ShadowLayersUpdated(ShadowLayersParent* aLayerTree,
CompositorParent::ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
const TargetConfig& aTargetConfig,
bool isFirstPaint)
{
@ -1099,10 +1099,10 @@ CompositorParent::SyncViewportInfo(const nsIntRect& aDisplayPort,
#endif
}
PLayersParent*
CompositorParent::AllocPLayers(const LayersBackend& aBackendHint,
const uint64_t& aId,
TextureFactoryIdentifier* aTextureFactoryIdentifier)
PLayerTransactionParent*
CompositorParent::AllocPLayerTransaction(const LayersBackend& aBackendHint,
const uint64_t& aId,
TextureFactoryIdentifier* aTextureFactoryIdentifier)
{
MOZ_ASSERT(aId == 0);
@ -1126,7 +1126,7 @@ CompositorParent::AllocPLayers(const LayersBackend& aBackendHint,
}
*aTextureFactoryIdentifier = mLayerManager->GetTextureFactoryIdentifier();
return new ShadowLayersParent(mLayerManager, this, 0);
return new LayerTransactionParent(mLayerManager, this, 0);
// Basic layers compositor not yet implemented
/*} else if (aBackendHint == mozilla::layers::LAYERS_BASIC) {
nsRefPtr<LayerManager> layerManager = new BasicShadowLayerManager(mWidget);
@ -1137,7 +1137,7 @@ CompositorParent::AllocPLayers(const LayersBackend& aBackendHint,
return NULL;
}
*aTextureFactoryIdentifier = layerManager->GetTextureFactoryIdentifier();
return new ShadowLayersParent(slm, this, 0); */
return new LayerTransactionParent(slm, this, 0); */
} else {
NS_ERROR("Unsupported backend selected for Async Compositor");
return NULL;
@ -1145,7 +1145,7 @@ CompositorParent::AllocPLayers(const LayersBackend& aBackendHint,
}
bool
CompositorParent::DeallocPLayers(PLayersParent* actor)
CompositorParent::DeallocPLayerTransaction(PLayerTransactionParent* actor)
{
delete actor;
return true;
@ -1280,12 +1280,14 @@ public:
SurfaceDescriptor* aOutSnapshot)
{ return true; }
virtual PLayersParent* AllocPLayers(const LayersBackend& aBackendType,
const uint64_t& aId,
TextureFactoryIdentifier* aTextureFactoryIdentifier) MOZ_OVERRIDE;
virtual bool DeallocPLayers(PLayersParent* aLayers) MOZ_OVERRIDE;
virtual PLayerTransactionParent*
AllocPLayerTransaction(const LayersBackend& aBackendType,
const uint64_t& aId,
TextureFactoryIdentifier* aTextureFactoryIdentifier) MOZ_OVERRIDE;
virtual void ShadowLayersUpdated(ShadowLayersParent* aLayerTree,
virtual bool DeallocPLayerTransaction(PLayerTransactionParent* aLayers) MOZ_OVERRIDE;
virtual void ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
const TargetConfig& aTargetConfig,
bool isFirstPaint) MOZ_OVERRIDE;
@ -1364,22 +1366,22 @@ CrossProcessCompositorParent::ActorDestroy(ActorDestroyReason aWhy)
NewRunnableMethod(this, &CrossProcessCompositorParent::DeferredDestroy));
}
PLayersParent*
CrossProcessCompositorParent::AllocPLayers(const LayersBackend& aBackendType,
const uint64_t& aId,
TextureFactoryIdentifier* aTextureFactoryIdentifier)
PLayerTransactionParent*
CrossProcessCompositorParent::AllocPLayerTransaction(const LayersBackend& aBackendType,
const uint64_t& aId,
TextureFactoryIdentifier* aTextureFactoryIdentifier)
{
MOZ_ASSERT(aId != 0);
nsRefPtr<LayerManager> lm = sCurrentCompositor->GetLayerManager();
*aTextureFactoryIdentifier = lm->GetTextureFactoryIdentifier();
return new ShadowLayersParent(lm->AsShadowManager(), this, aId);
return new LayerTransactionParent(lm->AsShadowManager(), this, aId);
}
bool
CrossProcessCompositorParent::DeallocPLayers(PLayersParent* aLayers)
CrossProcessCompositorParent::DeallocPLayerTransaction(PLayerTransactionParent* aLayers)
{
ShadowLayersParent* slp = static_cast<ShadowLayersParent*>(aLayers);
LayerTransactionParent* slp = static_cast<LayerTransactionParent*>(aLayers);
RemoveIndirectTree(slp->GetId());
delete aLayers;
return true;
@ -1387,7 +1389,7 @@ CrossProcessCompositorParent::DeallocPLayers(PLayersParent* aLayers)
void
CrossProcessCompositorParent::ShadowLayersUpdated(
ShadowLayersParent* aLayerTree,
LayerTransactionParent* aLayerTree,
const TargetConfig& aTargetConfig,
bool isFirstPaint)
{

View File

@ -16,7 +16,7 @@
//#define COMPOSITOR_PERFORMANCE_WARNING
#include "mozilla/layers/PCompositorParent.h"
#include "mozilla/layers/PLayersParent.h"
#include "mozilla/layers/PLayerTransactionParent.h"
#include "base/thread.h"
#include "mozilla/Monitor.h"
#include "mozilla/TimeStamp.h"
@ -76,7 +76,7 @@ public:
virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
virtual void ShadowLayersUpdated(ShadowLayersParent* aLayerTree,
virtual void ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
const TargetConfig& aTargetConfig,
bool isFirstPaint) MOZ_OVERRIDE;
/**
@ -168,10 +168,11 @@ public:
PlatformThreadId aThreadID);
protected:
virtual PLayersParent* AllocPLayers(const LayersBackend& aBackendHint,
const uint64_t& aId,
TextureFactoryIdentifier* aTextureFactoryIdentifier);
virtual bool DeallocPLayers(PLayersParent* aLayers);
virtual PLayerTransactionParent*
AllocPLayerTransaction(const LayersBackend& aBackendHint,
const uint64_t& aId,
TextureFactoryIdentifier* aTextureFactoryIdentifier);
virtual bool DeallocPLayerTransaction(PLayerTransactionParent* aLayers);
virtual void ScheduleTask(CancelableTask*, int);
virtual void Composite();
virtual void ComposeToTarget(gfxContext* aTarget);

View File

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "ShadowLayerChild.h"
#include "ShadowLayersChild.h"
#include "LayerTransactionChild.h"
#include "ShadowLayerUtils.h"
#include "mozilla/layers/CompositableClient.h"
@ -14,16 +14,16 @@ namespace mozilla {
namespace layers {
void
ShadowLayersChild::Destroy()
LayerTransactionChild::Destroy()
{
NS_ABORT_IF_FALSE(0 == ManagedPLayerChild().Length(),
"layers should have been cleaned up by now");
PLayersChild::Send__delete__(this);
PLayerTransactionChild::Send__delete__(this);
// WARNING: |this| has gone to the great heap in the sky
}
PGrallocBufferChild*
ShadowLayersChild::AllocPGrallocBuffer(const gfxIntSize&,
LayerTransactionChild::AllocPGrallocBuffer(const gfxIntSize&,
const gfxContentType&,
MaybeMagicGrallocBufferHandle*)
{
@ -36,7 +36,7 @@ ShadowLayersChild::AllocPGrallocBuffer(const gfxIntSize&,
}
bool
ShadowLayersChild::DeallocPGrallocBuffer(PGrallocBufferChild* actor)
LayerTransactionChild::DeallocPGrallocBuffer(PGrallocBufferChild* actor)
{
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
delete actor;
@ -48,7 +48,7 @@ ShadowLayersChild::DeallocPGrallocBuffer(PGrallocBufferChild* actor)
}
PLayerChild*
ShadowLayersChild::AllocPLayer()
LayerTransactionChild::AllocPLayer()
{
// we always use the "power-user" ctor
NS_RUNTIMEABORT("not reached");
@ -56,30 +56,30 @@ ShadowLayersChild::AllocPLayer()
}
bool
ShadowLayersChild::DeallocPLayer(PLayerChild* actor)
LayerTransactionChild::DeallocPLayer(PLayerChild* actor)
{
delete actor;
return true;
}
PCompositableChild*
ShadowLayersChild::AllocPCompositable(const TextureInfo& aInfo)
LayerTransactionChild::AllocPCompositable(const TextureInfo& aInfo)
{
return new CompositableChild();
}
bool
ShadowLayersChild::DeallocPCompositable(PCompositableChild* actor)
LayerTransactionChild::DeallocPCompositable(PCompositableChild* actor)
{
delete actor;
return true;
}
void
ShadowLayersChild::ActorDestroy(ActorDestroyReason why)
LayerTransactionChild::ActorDestroy(ActorDestroyReason why)
{
if (why == AbnormalShutdown) {
NS_RUNTIMEABORT("ActorDestroy by IPC channel failure at ShadowLayersChild");
NS_RUNTIMEABORT("ActorDestroy by IPC channel failure at LayerTransactionChild");
}
}

View File

@ -5,19 +5,19 @@
* 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_layers_ShadowLayersChild_h
#define mozilla_layers_ShadowLayersChild_h
#ifndef MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H
#define MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H
#include "mozilla/layers/PLayersChild.h"
#include "mozilla/layers/PLayerTransactionChild.h"
namespace mozilla {
namespace layers {
class ShadowLayersChild : public PLayersChild
class LayerTransactionChild : public PLayerTransactionChild
{
public:
ShadowLayersChild() { }
~ShadowLayersChild() { }
LayerTransactionChild() { }
~LayerTransactionChild() { }
/**
* Clean this up, finishing with Send__delete__().
@ -46,4 +46,4 @@ protected:
} // namespace layers
} // namespace mozilla
#endif // ifndef mozilla_layers_ShadowLayersChild_h
#endif // MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H

View File

@ -15,7 +15,7 @@
#include "mozilla/unused.h"
#include "RenderTrace.h"
#include "ShadowLayerParent.h"
#include "ShadowLayersParent.h"
#include "LayerTransactionParent.h"
#include "ShadowLayers.h"
#include "ShadowLayerUtils.h"
#include "TiledLayerBuffer.h"
@ -124,25 +124,25 @@ ShadowChild(const OpRaiseToTopChild& op)
}
//--------------------------------------------------
// ShadowLayersParent
ShadowLayersParent::ShadowLayersParent(ShadowLayerManager* aManager,
ShadowLayersManager* aLayersManager,
uint64_t aId)
// LayerTransactionParent
LayerTransactionParent::LayerTransactionParent(ShadowLayerManager* aManager,
ShadowLayersManager* aLayersManager,
uint64_t aId)
: mLayerManager(aManager)
, mShadowLayersManager(aLayersManager)
, mId(aId)
, mDestroyed(false)
{
MOZ_COUNT_CTOR(ShadowLayersParent);
MOZ_COUNT_CTOR(LayerTransactionParent);
}
ShadowLayersParent::~ShadowLayersParent()
LayerTransactionParent::~LayerTransactionParent()
{
MOZ_COUNT_DTOR(ShadowLayersParent);
MOZ_COUNT_DTOR(LayerTransactionParent);
}
void
ShadowLayersParent::Destroy()
LayerTransactionParent::Destroy()
{
mDestroyed = true;
for (size_t i = 0; i < ManagedPLayerParent().Length(); ++i) {
@ -154,18 +154,18 @@ ShadowLayersParent::Destroy()
/* virtual */
bool
ShadowLayersParent::RecvUpdateNoSwap(const InfallibleTArray<Edit>& cset,
const TargetConfig& targetConfig,
const bool& isFirstPaint)
LayerTransactionParent::RecvUpdateNoSwap(const InfallibleTArray<Edit>& cset,
const TargetConfig& targetConfig,
const bool& isFirstPaint)
{
return RecvUpdate(cset, targetConfig, isFirstPaint, nullptr);
}
bool
ShadowLayersParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
const TargetConfig& targetConfig,
const bool& isFirstPaint,
InfallibleTArray<EditReply>* reply)
LayerTransactionParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
const TargetConfig& targetConfig,
const bool& isFirstPaint,
InfallibleTArray<EditReply>* reply)
{
#ifdef COMPOSITOR_PERFORMANCE_WARNING
TimeStamp updateStart = TimeStamp::Now();
@ -421,7 +421,7 @@ ShadowLayersParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
}
void
ShadowLayersParent::Attach(ShadowLayerParent* aLayerParent, CompositableParent* aCompositable)
LayerTransactionParent::Attach(ShadowLayerParent* aLayerParent, CompositableParent* aCompositable)
{
ShadowLayer* layer = aLayerParent->AsLayer()->AsShadowLayer();
MOZ_ASSERT(layer);
@ -437,7 +437,7 @@ ShadowLayersParent::Attach(ShadowLayerParent* aLayerParent, CompositableParent*
}
bool
ShadowLayersParent::RecvClearCachedResources()
LayerTransactionParent::RecvClearCachedResources()
{
if (mRoot) {
// NB: |mRoot| here is the *child* context's root. In this parent
@ -449,9 +449,9 @@ ShadowLayersParent::RecvClearCachedResources()
}
PGrallocBufferParent*
ShadowLayersParent::AllocPGrallocBuffer(const gfxIntSize& aSize,
const gfxContentType& aContent,
MaybeMagicGrallocBufferHandle* aOutHandle)
LayerTransactionParent::AllocPGrallocBuffer(const gfxIntSize& aSize,
const gfxContentType& aContent,
MaybeMagicGrallocBufferHandle* aOutHandle)
{
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
return GrallocBufferActor::Create(aSize, aContent, aOutHandle);
@ -462,7 +462,7 @@ ShadowLayersParent::AllocPGrallocBuffer(const gfxIntSize& aSize,
}
bool
ShadowLayersParent::DeallocPGrallocBuffer(PGrallocBufferParent* actor)
LayerTransactionParent::DeallocPGrallocBuffer(PGrallocBufferParent* actor)
{
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
delete actor;
@ -474,26 +474,26 @@ ShadowLayersParent::DeallocPGrallocBuffer(PGrallocBufferParent* actor)
}
PLayerParent*
ShadowLayersParent::AllocPLayer()
LayerTransactionParent::AllocPLayer()
{
return new ShadowLayerParent();
}
bool
ShadowLayersParent::DeallocPLayer(PLayerParent* actor)
LayerTransactionParent::DeallocPLayer(PLayerParent* actor)
{
delete actor;
return true;
}
PCompositableParent*
ShadowLayersParent::AllocPCompositable(const TextureInfo& aInfo)
LayerTransactionParent::AllocPCompositable(const TextureInfo& aInfo)
{
return new CompositableParent(this, aInfo);
}
bool
ShadowLayersParent::DeallocPCompositable(PCompositableParent* actor)
LayerTransactionParent::DeallocPCompositable(PCompositableParent* actor)
{
delete actor;
return true;

View File

@ -5,10 +5,10 @@
* 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_layers_ShadowLayersParent_h
#define mozilla_layers_ShadowLayersParent_h
#ifndef MOZILLA_LAYERS_LAYERTRANSACTIONPARENT_H
#define MOZILLA_LAYERS_LAYERTRANSACTIONPARENT_H
#include "mozilla/layers/PLayersParent.h"
#include "mozilla/layers/PLayerTransactionParent.h"
#include "ShadowLayers.h"
#include "ShadowLayersManager.h"
#include "CompositableTransactionParent.h"
@ -26,18 +26,18 @@ class ShadowLayerManager;
class ShadowLayerParent;
class CompositableParent;
class ShadowLayersParent : public PLayersParent,
public CompositableParentManager
class LayerTransactionParent : public PLayerTransactionParent,
public CompositableParentManager
{
typedef mozilla::layout::RenderFrameParent RenderFrameParent;
typedef InfallibleTArray<Edit> EditArray;
typedef InfallibleTArray<EditReply> EditReplyArray;
public:
ShadowLayersParent(ShadowLayerManager* aManager,
ShadowLayersManager* aLayersManager,
uint64_t aId);
~ShadowLayersParent();
LayerTransactionParent(ShadowLayerManager* aManager,
ShadowLayersManager* aLayersManager,
uint64_t aId);
~LayerTransactionParent();
void Destroy();
@ -50,18 +50,18 @@ public:
virtual bool AllocShmem(size_t aSize,
ipc::SharedMemory::SharedMemoryType aType,
ipc::Shmem* aShmem) {
return PLayersParent::AllocShmem(aSize, aType, aShmem);
return PLayerTransactionParent::AllocShmem(aSize, aType, aShmem);
}
virtual bool AllocUnsafeShmem(size_t aSize,
ipc::SharedMemory::SharedMemoryType aType,
ipc::Shmem* aShmem) {
return PLayersParent::AllocUnsafeShmem(aSize, aType, aShmem);
return PLayerTransactionParent::AllocUnsafeShmem(aSize, aType, aShmem);
}
virtual void DeallocShmem(ipc::Shmem& aShmem) MOZ_OVERRIDE
{
PLayersParent::DeallocShmem(aShmem);
PLayerTransactionParent::DeallocShmem(aShmem);
}
@ -121,4 +121,4 @@ private:
} // namespace layers
} // namespace mozilla
#endif // ifndef mozilla_layers_ShadowLayersParent_h
#endif // MOZILLA_LAYERS_LAYERTRANSACTIONPARENT_H

View File

@ -5,17 +5,17 @@
* 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/. */
include protocol PLayers;
include protocol PLayerTransaction;
include protocol PImageBridge;
include "mozilla/layers/CompositorTypes.h";
include protocol PCompositor;
include "mozilla/layers/CompositorTypes.h";
namespace mozilla {
namespace layers {
async protocol PCompositable
{
manager PImageBridge or PLayers;
manager PImageBridge or PLayerTransaction;
parent:
async __delete__();
};

View File

@ -7,7 +7,7 @@
include LayersSurfaces;
include protocol PGrallocBuffer;
include protocol PLayers;
include protocol PLayerTransaction;
include "mozilla/layers/CompositorTypes.h";
using mozilla::null_t;
@ -21,14 +21,14 @@ namespace layers {
/**
* The PCompositor protocol is used to manage communication between
* the main thread and the compositor thread context. It's primary
* purpose is to manage the PLayers sub protocol.
* purpose is to manage the PLayerTransaction sub protocol.
*/
// This should really be 'sync', but we're using 'rpc' as a workaround
// for Bug 716631.
rpc protocol PCompositor
{
// A Compositor manages a single Layer Manager (PLayers)
manages PLayers;
// A Compositor manages a single Layer Manager (PLayerTransaction)
manages PLayerTransaction;
parent:
@ -53,7 +53,7 @@ parent:
sync MakeSnapshot(SurfaceDescriptor inSnapshot)
returns (SurfaceDescriptor outSnapshot);
sync PLayers(LayersBackend layersBackendHint, uint64_t id)
sync PLayerTransaction(LayersBackend layersBackendHint, uint64_t id)
returns (TextureFactoryIdentifier textureFactoryIdentifier);
};

View File

@ -7,7 +7,7 @@
include protocol PCompositor;
include protocol PImageBridge;
include protocol PLayers;
include protocol PLayerTransaction;
namespace mozilla {
namespace layers {
@ -20,7 +20,7 @@ namespace layers {
*/
async protocol PGrallocBuffer {
// FIXME: Bug 783451: shouldn't be managed by PCompositor or PImageContainer
manager PImageBridge or PLayers;
manager PImageBridge or PLayerTransaction;
/** Gralloc buffers can be "owned" by either parent or child. */
both:

View File

@ -5,7 +5,7 @@
* 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/. */
include protocol PLayers;
include protocol PLayerTransaction;
namespace mozilla {
namespace layers {
@ -15,7 +15,7 @@ namespace layers {
*/
async protocol PLayer {
manager PLayers;
manager PLayerTransaction;
/**
* OWNERSHIP MODEL

View File

@ -32,7 +32,7 @@ using mozilla::layers::TextureInfo;
namespace mozilla {
namespace layers {
sync protocol PLayers {
sync protocol PLayerTransaction {
manager PRenderFrame or PCompositor;
manages PLayer;
manages PCompositable;

View File

@ -5,7 +5,7 @@
* 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/. */
#include "ShadowLayersParent.h"
#include "LayerTransactionParent.h"
#include "ShadowLayerParent.h"
#include "ShadowLayers.h"
@ -68,7 +68,7 @@ ShadowLayerParent::ActorDestroy(ActorDestroyReason why)
break;
case FailedConstructor:
NS_RUNTIMEABORT("FailedConstructor isn't possible in PLayers");
NS_RUNTIMEABORT("FailedConstructor isn't possible in PLayerTransaction");
return; // unreached
}

View File

@ -16,7 +16,6 @@ namespace layers {
class ContainerLayer;
class Layer;
class LayerManager;
class ShadowLayersParent;
class ShadowLayerParent : public PLayerParent
{

View File

@ -8,7 +8,7 @@
#include <d3d10_1.h>
#include <dxgi.h>
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "ShadowLayers.h"
using namespace mozilla::gl;

View File

@ -9,7 +9,7 @@
#include "mozilla/layers/PGrallocBufferChild.h"
#include "mozilla/layers/PGrallocBufferParent.h"
#include "mozilla/layers/PLayersChild.h"
#include "mozilla/layers/PLayerTransactionChild.h"
#include "mozilla/layers/ShadowLayers.h"
#include "mozilla/unused.h"
#include "nsXULAppAPI.h"

View File

@ -5,7 +5,7 @@
* 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/. */
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "mozilla/layers/ShadowLayers.h"
#include "gfxPlatform.h"

View File

@ -5,7 +5,7 @@
* 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/. */
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "mozilla/layers/ShadowLayers.h"
#include "gfxPlatform.h"

View File

@ -14,8 +14,8 @@
#include "AutoOpenSurface.h"
#include "mozilla/ipc/SharedMemorySysV.h"
#include "mozilla/layers/PLayerChild.h"
#include "mozilla/layers/PLayersChild.h"
#include "mozilla/layers/PLayersParent.h"
#include "mozilla/layers/PLayerTransactionChild.h"
#include "mozilla/layers/PLayerTransactionParent.h"
#include "mozilla/layers/LayerTransaction.h"
#include "mozilla/layers/LayersSurfaces.h"
#include "ShadowLayers.h"

View File

@ -35,8 +35,8 @@ class Edit;
class EditReply;
class OptionalThebesBuffer;
class PLayerChild;
class PLayersChild;
class PLayersParent;
class PLayerTransactionChild;
class PLayerTransactionParent;
class ShadowableLayer;
class ShadowThebesLayer;
class ShadowContainerLayer;
@ -246,7 +246,7 @@ public:
/**
* Set aMaskLayer as the mask on aLayer.
* Note that only image layers are properly supported
* ShadowLayersParent::UpdateMask and accompanying ipdl
* LayerTransactionParent::UpdateMask and accompanying ipdl
* will need changing to update properties for other kinds
* of mask layer.
*/
@ -268,7 +268,7 @@ public:
* through ImageBridge, using an ID to connect the protocols on the
* compositor side.
*/
void AttachAsyncCompositable(PLayersChild* aLayer, uint64_t aID);
void AttachAsyncCompositable(PLayerTransactionChild* aLayer, uint64_t aID);
/**
* Communicate to the compositor that the texture identified by aLayer
@ -302,7 +302,7 @@ public:
/**
* Set an actor through which layer updates will be pushed.
*/
void SetShadowManager(PLayersChild* aShadowManager)
void SetShadowManager(PLayerTransactionChild* aShadowManager)
{
mShadowManager = aShadowManager;
}
@ -311,7 +311,7 @@ public:
* True if this is forwarding to a ShadowLayerManager.
*/
bool HasShadowManager() const { return !!mShadowManager; }
PLayersChild* GetShadowManager() const { return mShadowManager; }
PLayerTransactionChild* GetShadowManager() const { return mShadowManager; }
/**
* The following Alloc/Open/Destroy interfaces abstract over the
@ -374,7 +374,7 @@ public:
protected:
ShadowLayerForwarder();
PLayersChild* mShadowManager;
PLayerTransactionChild* mShadowManager;
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
virtual PGrallocBufferChild* AllocGrallocBuffer(const gfxIntSize& aSize,

View File

@ -11,12 +11,12 @@ namespace mozilla {
namespace layers {
class TargetConfig;
class ShadowLayersParent;
class LayerTransactionParent;
class ShadowLayersManager
{
public:
virtual void ShadowLayersUpdated(ShadowLayersParent* aLayerTree,
virtual void ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
const TargetConfig& aTargetConfig,
bool isFirstPaint) = 0;
};

View File

@ -10,5 +10,5 @@ IPDLSRCS = \
PGrallocBuffer.ipdl \
PImageBridge.ipdl \
PLayer.ipdl \
PLayers.ipdl \
PLayerTransaction.ipdl \
$(NULL)

View File

@ -84,8 +84,8 @@ EXPORTS.mozilla.layers += [
'ISurfaceAllocator.h',
'LayersTypes.h',
'ShadowLayers.h',
'ShadowLayersChild.h',
'ShadowLayersParent.h',
'LayerTransactionChild.h',
'LayerTransactionParent.h',
'ShadowLayersManager.h',
'RenderTrace.h',
'SharedRGBImage.h',

View File

@ -4,7 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "ipc/AutoOpenSurface.h"
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "mozilla/layers/ShadowLayers.h"
#include "gfxSharedImageSurface.h"

View File

@ -6,7 +6,7 @@
#ifndef GFX_COLORLAYEROGL_H
#define GFX_COLORLAYEROGL_H
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "mozilla/layers/ShadowLayers.h"
#include "LayerManagerOGL.h"

View File

@ -6,7 +6,7 @@
#ifndef GFX_IMAGELAYEROGL_H
#define GFX_IMAGELAYEROGL_H
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "LayerManagerOGL.h"
#include "ImageLayers.h"

View File

@ -5,10 +5,10 @@
#include "LayerManagerOGL.h"
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include <algorithm>
/* This must occur *after* layers/PLayers.h to avoid typedefs conflicts. */
/* This must occur *after* layers/PLayerTransaction.h to avoid typedefs conflicts. */
#include "mozilla/Util.h"
#include "Composer2D.h"

View File

@ -4,10 +4,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "ipc/AutoOpenSurface.h"
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "TiledLayerBuffer.h"
/* This must occur *after* layers/PLayers.h to avoid typedefs conflicts. */
/* This must occur *after* layers/PLayerTransaction.h to avoid typedefs conflicts. */
#include "mozilla/Util.h"
#include "ThebesLayerBuffer.h"

View File

@ -15,7 +15,7 @@
#include "mozilla/dom/PBrowserChild.h"
#include "mozilla/dom/TabChild.h"
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "nsDisplayList.h"

View File

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
include protocol PBrowser;
include protocol PLayers;
include protocol PLayerTransaction;
namespace mozilla {
namespace layout {
@ -23,7 +23,7 @@ namespace layout {
sync protocol PRenderFrame
{
manager PBrowser;
manages PLayers;
manages PLayerTransaction;
parent:
/**
@ -37,7 +37,7 @@ parent:
* |id| is set to 0 in the "direct" case, and to a whole number
* in the "indirect" case.
*/
async PLayers();
async PLayerTransaction();
async NotifyCompositorTransaction();
@ -47,7 +47,7 @@ parent:
async __delete__();
state EMPTY_OR_DIRECT_COMPOSITOR:
recv PLayers goto HAVE_CONTENT;
recv PLayerTransaction goto HAVE_CONTENT;
recv NotifyCompositorTransaction goto EMPTY_OR_DIRECT_COMPOSITOR;
recv __delete__;

View File

@ -6,10 +6,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "RenderFrameChild.h"
#include "mozilla/layers/ShadowLayersChild.h"
#include "mozilla/layers/LayerTransactionChild.h"
using mozilla::layers::PLayersChild;
using mozilla::layers::ShadowLayersChild;
using mozilla::layers::PLayerTransactionChild;
using mozilla::layers::LayerTransactionChild;
namespace mozilla {
namespace layout {
@ -17,13 +17,13 @@ namespace layout {
void
RenderFrameChild::Destroy()
{
size_t numChildren = ManagedPLayersChild().Length();
size_t numChildren = ManagedPLayerTransactionChild().Length();
NS_ABORT_IF_FALSE(0 == numChildren || 1 == numChildren,
"render frame must only have 0 or 1 layer forwarder");
if (numChildren) {
ShadowLayersChild* layers =
static_cast<ShadowLayersChild*>(ManagedPLayersChild()[0]);
LayerTransactionChild* layers =
static_cast<LayerTransactionChild*>(ManagedPLayerTransactionChild()[0]);
layers->Destroy();
// |layers| was just deleted, take care
}
@ -44,14 +44,14 @@ RenderFrameChild::DetectScrollableSubframe()
SendDetectScrollableSubframe();
}
PLayersChild*
RenderFrameChild::AllocPLayers()
PLayerTransactionChild*
RenderFrameChild::AllocPLayerTransaction()
{
return new ShadowLayersChild();
return new LayerTransactionChild();
}
bool
RenderFrameChild::DeallocPLayers(PLayersChild* aLayers)
RenderFrameChild::DeallocPLayerTransaction(PLayerTransactionChild* aLayers)
{
delete aLayers;
return true;

View File

@ -25,8 +25,8 @@ public:
void Destroy();
protected:
virtual PLayersChild* AllocPLayers() MOZ_OVERRIDE;
virtual bool DeallocPLayers(PLayersChild* aLayers) MOZ_OVERRIDE;
virtual PLayerTransactionChild* AllocPLayerTransaction() MOZ_OVERRIDE;
virtual bool DeallocPLayerTransaction(PLayerTransactionChild* aLayers) MOZ_OVERRIDE;
};
} // namespace layout

View File

@ -17,7 +17,7 @@
#include "mozilla/dom/TabParent.h"
#include "mozilla/layers/AsyncPanZoomController.h"
#include "mozilla/layers/CompositorParent.h"
#include "mozilla/layers/ShadowLayersParent.h"
#include "mozilla/layers/LayerTransactionParent.h"
#include "nsContentUtils.h"
#include "nsFrameLoader.h"
#include "nsIObserver.h"
@ -629,13 +629,13 @@ RenderFrameParent::~RenderFrameParent()
void
RenderFrameParent::Destroy()
{
size_t numChildren = ManagedPLayersParent().Length();
size_t numChildren = ManagedPLayerTransactionParent().Length();
NS_ABORT_IF_FALSE(0 == numChildren || 1 == numChildren,
"render frame must only have 0 or 1 layer manager");
if (numChildren) {
ShadowLayersParent* layers =
static_cast<ShadowLayersParent*>(ManagedPLayersParent()[0]);
LayerTransactionParent* layers =
static_cast<LayerTransactionParent*>(ManagedPLayerTransactionParent()[0]);
layers->Destroy();
}
@ -657,7 +657,7 @@ RenderFrameParent::ContentViewScaleChanged(nsContentView* aView)
}
void
RenderFrameParent::ShadowLayersUpdated(ShadowLayersParent* aLayerTree,
RenderFrameParent::ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
const TargetConfig& aTargetConfig,
bool isFirstPaint)
{
@ -846,18 +846,18 @@ RenderFrameParent::RecvDetectScrollableSubframe()
return true;
}
PLayersParent*
RenderFrameParent::AllocPLayers()
PLayerTransactionParent*
RenderFrameParent::AllocPLayerTransaction()
{
if (!mFrameLoader || mFrameLoaderDestroyed) {
return nullptr;
}
nsRefPtr<LayerManager> lm = GetFrom(mFrameLoader);
return new ShadowLayersParent(lm->AsShadowManager(), this, 0);
return new LayerTransactionParent(lm->AsShadowManager(), this, 0);
}
bool
RenderFrameParent::DeallocPLayers(PLayersParent* aLayers)
RenderFrameParent::DeallocPLayerTransaction(PLayerTransactionParent* aLayers)
{
delete aLayers;
return true;
@ -915,14 +915,14 @@ RenderFrameParent::TriggerRepaint()
docFrame->SchedulePaint();
}
ShadowLayersParent*
LayerTransactionParent*
RenderFrameParent::GetShadowLayers() const
{
const InfallibleTArray<PLayersParent*>& shadowParents = ManagedPLayersParent();
const InfallibleTArray<PLayerTransactionParent*>& shadowParents = ManagedPLayerTransactionParent();
NS_ABORT_IF_FALSE(shadowParents.Length() <= 1,
"can only support at most 1 ShadowLayersParent");
"can only support at most 1 LayerTransactionParent");
return (shadowParents.Length() == 1) ?
static_cast<ShadowLayersParent*>(shadowParents[0]) : nullptr;
static_cast<LayerTransactionParent*>(shadowParents[0]) : nullptr;
}
uint64_t
@ -934,7 +934,7 @@ RenderFrameParent::GetLayerTreeId() const
ContainerLayer*
RenderFrameParent::GetRootLayer() const
{
ShadowLayersParent* shadowLayers = GetShadowLayers();
LayerTransactionParent* shadowLayers = GetShadowLayers();
return shadowLayers ? shadowLayers->GetRoot() : nullptr;
}

View File

@ -28,7 +28,7 @@ namespace layers {
class AsyncPanZoomController;
class GestureEventListener;
class TargetConfig;
class ShadowLayersParent;
class LayerTransactionParent;
struct TextureFactoryIdentifier;
}
@ -44,7 +44,7 @@ class RenderFrameParent : public PRenderFrameParent,
typedef mozilla::layers::Layer Layer;
typedef mozilla::layers::LayerManager LayerManager;
typedef mozilla::layers::TargetConfig TargetConfig;
typedef mozilla::layers::ShadowLayersParent ShadowLayersParent;
typedef mozilla::layers::LayerTransactionParent LayerTransactionParent;
typedef mozilla::FrameLayerBuilder::ContainerParameters ContainerParameters;
typedef mozilla::layers::TextureFactoryIdentifier TextureFactoryIdentifier;
typedef FrameMetrics::ViewID ViewID;
@ -73,7 +73,7 @@ public:
void ContentViewScaleChanged(nsContentView* aView);
virtual void ShadowLayersUpdated(ShadowLayersParent* aLayerTree,
virtual void ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
const TargetConfig& aTargetConfig,
bool isFirstPaint) MOZ_OVERRIDE;
@ -112,15 +112,15 @@ protected:
virtual bool RecvCancelDefaultPanZoom() MOZ_OVERRIDE;
virtual bool RecvDetectScrollableSubframe() MOZ_OVERRIDE;
virtual PLayersParent* AllocPLayers() MOZ_OVERRIDE;
virtual bool DeallocPLayers(PLayersParent* aLayers) MOZ_OVERRIDE;
virtual PLayerTransactionParent* AllocPLayerTransaction() MOZ_OVERRIDE;
virtual bool DeallocPLayerTransaction(PLayerTransactionParent* aLayers) MOZ_OVERRIDE;
private:
void BuildViewMap();
void TriggerRepaint();
void DispatchEventForPanZoomController(const InputEvent& aEvent);
ShadowLayersParent* GetShadowLayers() const;
LayerTransactionParent* GetShadowLayers() const;
uint64_t GetLayerTreeId() const;
ContainerLayer* GetRootLayer() const;

View File

@ -65,7 +65,7 @@ static gfxIntSize gAndroidScreenBounds;
#include "mozilla/layers/AsyncPanZoomController.h"
#include "mozilla/layers/CompositorChild.h"
#include "mozilla/layers/CompositorParent.h"
#include "mozilla/layers/ShadowLayersParent.h"
#include "mozilla/layers/LayerTransactionParent.h"
#include "mozilla/Mutex.h"
#include "nsThreadUtils.h"
@ -683,7 +683,7 @@ nsWindow::SetWindowClass(const nsAString& xulWinType)
}
mozilla::layers::LayerManager*
nsWindow::GetLayerManager(PLayersChild*, LayersBackend, LayerManagerPersistence,
nsWindow::GetLayerManager(PLayerTransactionChild*, LayersBackend, LayerManagerPersistence,
bool* aAllowRetaining)
{
if (aAllowRetaining) {
@ -2479,7 +2479,7 @@ public:
}
}
virtual void ShadowLayersUpdated(mozilla::layers::ShadowLayersParent* aLayerTree,
virtual void ShadowLayersUpdated(mozilla::layers::LayerTransactionParent* aLayerTree,
const mozilla::layers::TargetConfig& aTargetConfig,
bool isFirstPaint) MOZ_OVERRIDE
{

View File

@ -134,7 +134,7 @@ public:
uint32_t aNewEnd) MOZ_OVERRIDE;
virtual nsIMEUpdatePreference GetIMEUpdatePreference();
LayerManager* GetLayerManager (PLayersChild* aShadowManager = nullptr,
LayerManager* GetLayerManager (PLayerTransactionChild* aShadowManager = nullptr,
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
bool* aAllowRetaining = nullptr);

View File

@ -255,7 +255,7 @@ public:
NS_IMETHOD Invalidate(const nsIntRect &aRect);
virtual nsresult ConfigureChildren(const nsTArray<Configuration>& aConfigurations);
virtual LayerManager* GetLayerManager(PLayersChild* aShadowManager = nullptr,
virtual LayerManager* GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
bool* aAllowRetaining = nullptr);

View File

@ -993,7 +993,7 @@ nsCocoaWindow::ConfigureChildren(const nsTArray<Configuration>& aConfigurations)
}
LayerManager*
nsCocoaWindow::GetLayerManager(PLayersChild* aShadowManager,
nsCocoaWindow::GetLayerManager(PLayerTransactionChild* aShadowManager,
LayersBackend aBackendHint,
LayerManagerPersistence aPersistence,
bool* aAllowRetaining)

View File

@ -19,7 +19,7 @@
#include "Framebuffer.h"
#include "HwcComposer2D.h"
#include "LayerManagerOGL.h"
#include "mozilla/layers/PLayers.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "mozilla/layers/ShadowLayerUtilsGralloc.h"
#include "mozilla/StaticPtr.h"
#include "cutils/properties.h"

View File

@ -539,7 +539,7 @@ nsWindow::GetDPI()
}
LayerManager *
nsWindow::GetLayerManager(PLayersChild* aShadowManager,
nsWindow::GetLayerManager(PLayerTransactionChild* aShadowManager,
LayersBackend aBackendHint,
LayerManagerPersistence aPersistence,
bool* aAllowRetaining)

View File

@ -94,7 +94,7 @@ public:
virtual float GetDPI();
virtual mozilla::layers::LayerManager*
GetLayerManager(PLayersChild* aShadowManager = nullptr,
GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
bool* aAllowRetaining = nullptr);

View File

@ -6164,7 +6164,7 @@ nsWindow::BeginResizeDrag(nsGUIEvent* aEvent, int32_t aHorizontal, int32_t aVert
}
nsIWidget::LayerManager*
nsWindow::GetLayerManager(PLayersChild* aShadowManager,
nsWindow::GetLayerManager(PLayerTransactionChild* aShadowManager,
LayersBackend aBackendHint,
LayerManagerPersistence aPersistence,
bool* aAllowRetaining)

View File

@ -430,7 +430,7 @@ private:
void DispatchMissedButtonReleases(GdkEventCrossing *aGdkEvent);
// nsBaseWidget
virtual LayerManager* GetLayerManager(PLayersChild* aShadowManager = nullptr,
virtual LayerManager* GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
bool* aAllowRetaining = nullptr) MOZ_OVERRIDE;

View File

@ -45,7 +45,7 @@ namespace layers {
class Composer2D;
class CompositorChild;
class LayerManager;
class PLayersChild;
class PLayerTransactionChild;
}
}
@ -419,7 +419,7 @@ class nsIWidget : public nsISupports {
typedef mozilla::layers::CompositorChild CompositorChild;
typedef mozilla::layers::LayerManager LayerManager;
typedef mozilla::layers::LayersBackend LayersBackend;
typedef mozilla::layers::PLayersChild PLayersChild;
typedef mozilla::layers::PLayerTransactionChild PLayerTransactionChild;
typedef mozilla::widget::NotificationToIME NotificationToIME;
typedef mozilla::widget::IMEState IMEState;
typedef mozilla::widget::InputContext InputContext;
@ -1148,7 +1148,7 @@ class nsIWidget : public nsISupports {
* type |aBackendHint| instead of what would normally be created.
* LAYERS_NONE means "no hint".
*/
virtual LayerManager* GetLayerManager(PLayersChild* aShadowManager,
virtual LayerManager* GetLayerManager(PLayerTransactionChild* aShadowManager,
LayersBackend aBackendHint,
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
bool* aAllowRetaining = nullptr) = 0;

View File

@ -3210,7 +3210,7 @@ nsWindow::ShouldUseOffMainThreadCompositing()
}
LayerManager*
nsWindow::GetLayerManager(PLayersChild* aShadowManager,
nsWindow::GetLayerManager(PLayerTransactionChild* aShadowManager,
LayersBackend aBackendHint,
LayerManagerPersistence aPersistence,
bool* aAllowRetaining)

View File

@ -136,7 +136,7 @@ public:
bool aDoCapture);
NS_IMETHOD GetAttention(int32_t aCycleCount);
virtual bool HasPendingInputEvent();
virtual LayerManager* GetLayerManager(PLayersChild* aShadowManager = nullptr,
virtual LayerManager* GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
bool* aAllowRetaining = nullptr);

View File

@ -793,7 +793,7 @@ MetroWidget::ShouldUseBasicManager()
}
LayerManager*
MetroWidget::GetLayerManager(PLayersChild* aShadowManager,
MetroWidget::GetLayerManager(PLayerTransactionChild* aShadowManager,
LayersBackend aBackendHint,
LayerManagerPersistence aPersistence,
bool* aAllowRetaining)

View File

@ -119,7 +119,7 @@ public:
virtual bool ShouldUseOffMainThreadCompositing();
bool ShouldUseMainThreadD3D10Manager();
bool ShouldUseBasicManager();
virtual LayerManager* GetLayerManager(PLayersChild* aShadowManager = nullptr,
virtual LayerManager* GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
bool* aAllowRetaining = nullptr);

View File

@ -15,7 +15,7 @@
#include "mozilla/dom/TabChild.h"
#include "mozilla/Hal.h"
#include "mozilla/layers/CompositorChild.h"
#include "mozilla/layers/PLayersChild.h"
#include "mozilla/layers/PLayerTransactionChild.h"
#include "PuppetWidget.h"
#include "nsIWidgetListener.h"
@ -304,7 +304,7 @@ PuppetWidget::DispatchEvent(nsGUIEvent* event, nsEventStatus& aStatus)
}
LayerManager*
PuppetWidget::GetLayerManager(PLayersChild* aShadowManager,
PuppetWidget::GetLayerManager(PLayerTransactionChild* aShadowManager,
LayersBackend aBackendHint,
LayerManagerPersistence aPersistence,
bool* aAllowRetaining)

View File

@ -143,7 +143,7 @@ public:
{ return eTransparencyTransparent; }
virtual LayerManager*
GetLayerManager(PLayersChild* aShadowManager = nullptr,
GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
bool* aAllowRetaining = nullptr);

View File

@ -896,9 +896,9 @@ void nsBaseWidget::CreateCompositor(int aWidth, int aHeight)
mCompositorChild->Open(parentChannel, childMessageLoop, childSide);
TextureFactoryIdentifier textureFactoryIdentifier;
PLayersChild* shadowManager;
PLayerTransactionChild* shadowManager;
mozilla::layers::LayersBackend backendHint = mozilla::layers::LAYERS_OPENGL;
shadowManager = mCompositorChild->SendPLayersConstructor(
shadowManager = mCompositorChild->SendPLayerTransactionConstructor(
backendHint, 0, &textureFactoryIdentifier);
if (shadowManager) {
@ -927,7 +927,7 @@ bool nsBaseWidget::ShouldUseOffMainThreadCompositing()
return CompositorParent::CompositorLoop() && !isSmallPopup;
}
LayerManager* nsBaseWidget::GetLayerManager(PLayersChild* aShadowManager,
LayerManager* nsBaseWidget::GetLayerManager(PLayerTransactionChild* aShadowManager,
LayersBackend aBackendHint,
LayerManagerPersistence aPersistence,
bool* aAllowRetaining)

View File

@ -105,7 +105,7 @@ public:
NS_IMETHOD HideWindowChrome(bool aShouldHide);
NS_IMETHOD MakeFullScreen(bool aFullScreen);
virtual nsDeviceContext* GetDeviceContext();
virtual LayerManager* GetLayerManager(PLayersChild* aShadowManager = nullptr,
virtual LayerManager* GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
bool* aAllowRetaining = nullptr);