From a1ee3bf8070a40a7a742d927b7142427f3fed8ae Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Wed, 24 Apr 2013 14:42:40 -0400 Subject: [PATCH] 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 --- dom/ipc/TabChild.cpp | 10 ++-- dom/plugins/base/nsNPAPIPlugin.cpp | 2 +- gfx/layers/Layers.cpp | 2 +- gfx/layers/Makefile.in | 4 +- gfx/layers/basic/BasicCanvasLayer.cpp | 2 +- gfx/layers/basic/BasicColorLayer.cpp | 2 +- gfx/layers/basic/BasicImageLayer.cpp | 2 +- gfx/layers/basic/BasicLayerManager.cpp | 6 +-- gfx/layers/basic/BasicLayers.h | 2 +- gfx/layers/basic/BasicLayersImpl.cpp | 2 +- gfx/layers/basic/BasicThebesLayer.h | 2 +- gfx/layers/basic/BasicTiledThebesLayer.cpp | 2 +- gfx/layers/client/CompositableClient.cpp | 2 +- gfx/layers/client/CompositableClient.h | 1 - gfx/layers/composite/CanvasLayerComposite.cpp | 2 +- gfx/layers/composite/ColorLayerComposite.h | 2 +- gfx/layers/composite/CompositableHost.h | 4 +- .../composite/ContainerLayerComposite.h | 2 +- gfx/layers/composite/ImageLayerComposite.h | 2 +- .../composite/LayerManagerComposite.cpp | 5 +- gfx/layers/composite/LayerManagerComposite.h | 8 +++ gfx/layers/composite/ThebesLayerComposite.cpp | 5 +- gfx/layers/composite/ThebesLayerComposite.h | 2 +- gfx/layers/d3d10/ThebesLayerD3D10.cpp | 5 +- gfx/layers/d3d9/CanvasLayerD3D9.cpp | 2 +- gfx/layers/d3d9/ImageLayerD3D9.cpp | 2 +- gfx/layers/d3d9/ThebesLayerD3D9.cpp | 5 +- gfx/layers/ipc/AutoOpenSurface.h | 2 +- gfx/layers/ipc/CompositorChild.cpp | 22 ++++---- gfx/layers/ipc/CompositorChild.h | 10 ++-- gfx/layers/ipc/CompositorParent.cpp | 52 ++++++++++--------- gfx/layers/ipc/CompositorParent.h | 13 ++--- ...ersChild.cpp => LayerTransactionChild.cpp} | 22 ++++---- ...wLayersChild.h => LayerTransactionChild.h} | 14 ++--- ...sParent.cpp => LayerTransactionParent.cpp} | 52 +++++++++---------- ...ayersParent.h => LayerTransactionParent.h} | 26 +++++----- gfx/layers/ipc/PCompositable.ipdl | 6 +-- gfx/layers/ipc/PCompositor.ipdl | 10 ++-- gfx/layers/ipc/PGrallocBuffer.ipdl | 4 +- gfx/layers/ipc/PLayer.ipdl | 4 +- .../{PLayers.ipdl => PLayerTransaction.ipdl} | 2 +- gfx/layers/ipc/ShadowLayerParent.cpp | 4 +- gfx/layers/ipc/ShadowLayerParent.h | 1 - gfx/layers/ipc/ShadowLayerUtilsD3D10.cpp | 2 +- gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp | 2 +- gfx/layers/ipc/ShadowLayerUtilsMac.cpp | 2 +- gfx/layers/ipc/ShadowLayerUtilsX11.cpp | 2 +- gfx/layers/ipc/ShadowLayers.cpp | 4 +- gfx/layers/ipc/ShadowLayers.h | 14 ++--- gfx/layers/ipc/ShadowLayersManager.h | 4 +- gfx/layers/ipc/ipdl.mk | 2 +- gfx/layers/moz.build | 4 +- gfx/layers/opengl/CanvasLayerOGL.cpp | 2 +- gfx/layers/opengl/ColorLayerOGL.h | 2 +- gfx/layers/opengl/ImageLayerOGL.h | 2 +- gfx/layers/opengl/LayerManagerOGL.cpp | 4 +- gfx/layers/opengl/ThebesLayerOGL.cpp | 4 +- layout/base/nsDisplayList.cpp | 2 +- layout/ipc/PRenderFrame.ipdl | 8 +-- layout/ipc/RenderFrameChild.cpp | 20 +++---- layout/ipc/RenderFrameChild.h | 4 +- layout/ipc/RenderFrameParent.cpp | 28 +++++----- layout/ipc/RenderFrameParent.h | 12 ++--- widget/android/nsWindow.cpp | 6 +-- widget/android/nsWindow.h | 2 +- widget/cocoa/nsCocoaWindow.h | 2 +- widget/cocoa/nsCocoaWindow.mm | 2 +- widget/gonk/HwcComposer2D.cpp | 2 +- widget/gonk/nsWindow.cpp | 2 +- widget/gonk/nsWindow.h | 2 +- widget/gtk2/nsWindow.cpp | 2 +- widget/gtk2/nsWindow.h | 2 +- widget/nsIWidget.h | 6 +-- widget/windows/nsWindow.cpp | 2 +- widget/windows/nsWindow.h | 2 +- widget/windows/winrt/MetroWidget.cpp | 2 +- widget/windows/winrt/MetroWidget.h | 2 +- widget/xpwidgets/PuppetWidget.cpp | 4 +- widget/xpwidgets/PuppetWidget.h | 2 +- widget/xpwidgets/nsBaseWidget.cpp | 6 +-- widget/xpwidgets/nsBaseWidget.h | 2 +- 81 files changed, 260 insertions(+), 245 deletions(-) rename gfx/layers/ipc/{ShadowLayersChild.cpp => LayerTransactionChild.cpp} (70%) rename gfx/layers/ipc/{ShadowLayersChild.h => LayerTransactionChild.h} (80%) rename gfx/layers/ipc/{ShadowLayersParent.cpp => LayerTransactionParent.cpp} (89%) rename gfx/layers/ipc/{ShadowLayersParent.h => LayerTransactionParent.h} (84%) rename gfx/layers/ipc/{PLayers.ipdl => PLayerTransaction.ipdl} (98%) diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index de989a890c64..99710da71e12 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -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) { diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp index 7b087f122ffc..d1fc379f1b35 100644 --- a/dom/plugins/base/nsNPAPIPlugin.cpp +++ b/dom/plugins/base/nsNPAPIPlugin.cpp @@ -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" diff --git a/gfx/layers/Layers.cpp b/gfx/layers/Layers.cpp index 73da2b330dad..ea99e20f1ef3 100644 --- a/gfx/layers/Layers.cpp +++ b/gfx/layers/Layers.cpp @@ -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" diff --git a/gfx/layers/Makefile.in b/gfx/layers/Makefile.in index fcc6a384c76f..8056227651aa 100644 --- a/gfx/layers/Makefile.in +++ b/gfx/layers/Makefile.in @@ -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 \ diff --git a/gfx/layers/basic/BasicCanvasLayer.cpp b/gfx/layers/basic/BasicCanvasLayer.cpp index b2b4d1b21c17..e13cc11cfd12 100644 --- a/gfx/layers/basic/BasicCanvasLayer.cpp +++ b/gfx/layers/basic/BasicCanvasLayer.cpp @@ -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" diff --git a/gfx/layers/basic/BasicColorLayer.cpp b/gfx/layers/basic/BasicColorLayer.cpp index df1075849585..adf761152402 100644 --- a/gfx/layers/basic/BasicColorLayer.cpp +++ b/gfx/layers/basic/BasicColorLayer.cpp @@ -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; diff --git a/gfx/layers/basic/BasicImageLayer.cpp b/gfx/layers/basic/BasicImageLayer.cpp index 7da766f5df1f..1b301c442fdf 100644 --- a/gfx/layers/basic/BasicImageLayer.cpp +++ b/gfx/layers/basic/BasicImageLayer.cpp @@ -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" diff --git a/gfx/layers/basic/BasicLayerManager.cpp b/gfx/layers/basic/BasicLayerManager.cpp index c4ada48eb5ae..46e61eb1ae3a 100644 --- a/gfx/layers/basic/BasicLayerManager.cpp +++ b/gfx/layers/basic/BasicLayerManager.cpp @@ -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); diff --git a/gfx/layers/basic/BasicLayers.h b/gfx/layers/basic/BasicLayers.h index e02e1294678f..4811e8b76498 100644 --- a/gfx/layers/basic/BasicLayers.h +++ b/gfx/layers/basic/BasicLayers.h @@ -183,7 +183,7 @@ protected: nsRefPtr 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 diff --git a/gfx/layers/basic/BasicLayersImpl.cpp b/gfx/layers/basic/BasicLayersImpl.cpp index f128cc9d95f7..58d565beaa40 100644 --- a/gfx/layers/basic/BasicLayersImpl.cpp +++ b/gfx/layers/basic/BasicLayersImpl.cpp @@ -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; diff --git a/gfx/layers/basic/BasicThebesLayer.h b/gfx/layers/basic/BasicThebesLayer.h index 6df8aeda22c8..cbc1cce55593 100644 --- a/gfx/layers/basic/BasicThebesLayer.h +++ b/gfx/layers/basic/BasicThebesLayer.h @@ -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" diff --git a/gfx/layers/basic/BasicTiledThebesLayer.cpp b/gfx/layers/basic/BasicTiledThebesLayer.cpp index 35d3743ef583..013e83707cd1 100644 --- a/gfx/layers/basic/BasicTiledThebesLayer.cpp +++ b/gfx/layers/basic/BasicTiledThebesLayer.cpp @@ -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" diff --git a/gfx/layers/client/CompositableClient.cpp b/gfx/layers/client/CompositableClient.cpp index 0e962cc30986..fcb9db3a00c8 100644 --- a/gfx/layers/client/CompositableClient.cpp +++ b/gfx/layers/client/CompositableClient.cpp @@ -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 { diff --git a/gfx/layers/client/CompositableClient.h b/gfx/layers/client/CompositableClient.h index a9bd56d13259..a8f1c028d4b8 100644 --- a/gfx/layers/client/CompositableClient.h +++ b/gfx/layers/client/CompositableClient.h @@ -16,7 +16,6 @@ namespace layers { class CompositableChild; class CompositableClient; class TextureClient; -class ShadowLayersChild; class ImageBridgeChild; class ShadowableLayer; class CompositableForwarder; diff --git a/gfx/layers/composite/CanvasLayerComposite.cpp b/gfx/layers/composite/CanvasLayerComposite.cpp index 20a072b76b6c..8637dd2b309d 100644 --- a/gfx/layers/composite/CanvasLayerComposite.cpp +++ b/gfx/layers/composite/CanvasLayerComposite.cpp @@ -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" diff --git a/gfx/layers/composite/ColorLayerComposite.h b/gfx/layers/composite/ColorLayerComposite.h index 3d69f4655830..076ca1fdc0a5 100644 --- a/gfx/layers/composite/ColorLayerComposite.h +++ b/gfx/layers/composite/ColorLayerComposite.h @@ -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" diff --git a/gfx/layers/composite/CompositableHost.h b/gfx/layers/composite/CompositableHost.h index 8f82209391eb..d8cbce78f367 100644 --- a/gfx/layers/composite/CompositableHost.h +++ b/gfx/layers/composite/CompositableHost.h @@ -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 diff --git a/gfx/layers/composite/ContainerLayerComposite.h b/gfx/layers/composite/ContainerLayerComposite.h index 774dceb91357..c63a78a5cea7 100644 --- a/gfx/layers/composite/ContainerLayerComposite.h +++ b/gfx/layers/composite/ContainerLayerComposite.h @@ -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" diff --git a/gfx/layers/composite/ImageLayerComposite.h b/gfx/layers/composite/ImageLayerComposite.h index 19f7d28a39d2..9e470a6794f6 100644 --- a/gfx/layers/composite/ImageLayerComposite.h +++ b/gfx/layers/composite/ImageLayerComposite.h @@ -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" diff --git a/gfx/layers/composite/LayerManagerComposite.cpp b/gfx/layers/composite/LayerManagerComposite.cpp index 029aba61fb6d..ed8b8ded7291 100644 --- a/gfx/layers/composite/LayerManagerComposite.cpp +++ b/gfx/layers/composite/LayerManagerComposite.cpp @@ -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" diff --git a/gfx/layers/composite/LayerManagerComposite.h b/gfx/layers/composite/LayerManagerComposite.h index c4af147865ff..d5df8e46eac7 100644 --- a/gfx/layers/composite/LayerManagerComposite.h +++ b/gfx/layers/composite/LayerManagerComposite.h @@ -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 { diff --git a/gfx/layers/composite/ThebesLayerComposite.cpp b/gfx/layers/composite/ThebesLayerComposite.cpp index c16487ce886f..e6a79b9866ca 100644 --- a/gfx/layers/composite/ThebesLayerComposite.cpp +++ b/gfx/layers/composite/ThebesLayerComposite.cpp @@ -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" diff --git a/gfx/layers/composite/ThebesLayerComposite.h b/gfx/layers/composite/ThebesLayerComposite.h index c524cc8ca150..8bc615e46e41 100644 --- a/gfx/layers/composite/ThebesLayerComposite.h +++ b/gfx/layers/composite/ThebesLayerComposite.h @@ -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" diff --git a/gfx/layers/d3d10/ThebesLayerD3D10.cpp b/gfx/layers/d3d10/ThebesLayerD3D10.cpp index f7cb802f2e19..552991807c95 100644 --- a/gfx/layers/d3d10/ThebesLayerD3D10.cpp +++ b/gfx/layers/d3d10/ThebesLayerD3D10.cpp @@ -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" diff --git a/gfx/layers/d3d9/CanvasLayerD3D9.cpp b/gfx/layers/d3d9/CanvasLayerD3D9.cpp index 1eee27245f65..0273b94fee85 100644 --- a/gfx/layers/d3d9/CanvasLayerD3D9.cpp +++ b/gfx/layers/d3d9/CanvasLayerD3D9.cpp @@ -5,7 +5,7 @@ #include "ipc/AutoOpenSurface.h" -#include "mozilla/layers/PLayers.h" +#include "mozilla/layers/PLayerTransaction.h" #include "gfxImageSurface.h" #include "gfxWindowsSurface.h" diff --git a/gfx/layers/d3d9/ImageLayerD3D9.cpp b/gfx/layers/d3d9/ImageLayerD3D9.cpp index ed6c739c12f2..e810d8b592a6 100644 --- a/gfx/layers/d3d9/ImageLayerD3D9.cpp +++ b/gfx/layers/d3d9/ImageLayerD3D9.cpp @@ -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" diff --git a/gfx/layers/d3d9/ThebesLayerD3D9.cpp b/gfx/layers/d3d9/ThebesLayerD3D9.cpp index b2c66c738c5a..74dbfa42a59e 100644 --- a/gfx/layers/d3d9/ThebesLayerD3D9.cpp +++ b/gfx/layers/d3d9/ThebesLayerD3D9.cpp @@ -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" diff --git a/gfx/layers/ipc/AutoOpenSurface.h b/gfx/layers/ipc/AutoOpenSurface.h index 4f628cd2686f..231285b92009 100644 --- a/gfx/layers/ipc/AutoOpenSurface.h +++ b/gfx/layers/ipc/AutoOpenSurface.h @@ -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 { diff --git a/gfx/layers/ipc/CompositorChild.cpp b/gfx/layers/ipc/CompositorChild.cpp index df20dfcd504a..85320dfbaa07 100644 --- a/gfx/layers/ipc/CompositorChild.cpp +++ b/gfx/layers/ipc/CompositorChild.cpp @@ -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(ManagedPLayersChild()[len - 1]); + while (size_t len = ManagedPLayerTransactionChild().Length()) { + LayerTransactionChild* layers = + static_cast(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; diff --git a/gfx/layers/ipc/CompositorChild.h b/gfx/layers/ipc/CompositorChild.h index d3baca9031bf..d0240252c43e 100644 --- a/gfx/layers/ipc/CompositorChild.h +++ b/gfx/layers/ipc/CompositorChild.h @@ -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; diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index b18c383bac1e..a2a8f2116775 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -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 = 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 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(aLayers); + LayerTransactionParent* slp = static_cast(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) { diff --git a/gfx/layers/ipc/CompositorParent.h b/gfx/layers/ipc/CompositorParent.h index 373da54b3544..6c42187cdc51 100644 --- a/gfx/layers/ipc/CompositorParent.h +++ b/gfx/layers/ipc/CompositorParent.h @@ -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); diff --git a/gfx/layers/ipc/ShadowLayersChild.cpp b/gfx/layers/ipc/LayerTransactionChild.cpp similarity index 70% rename from gfx/layers/ipc/ShadowLayersChild.cpp rename to gfx/layers/ipc/LayerTransactionChild.cpp index 5467e6699b01..f9d51fd2a1b1 100644 --- a/gfx/layers/ipc/ShadowLayersChild.cpp +++ b/gfx/layers/ipc/LayerTransactionChild.cpp @@ -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"); } } diff --git a/gfx/layers/ipc/ShadowLayersChild.h b/gfx/layers/ipc/LayerTransactionChild.h similarity index 80% rename from gfx/layers/ipc/ShadowLayersChild.h rename to gfx/layers/ipc/LayerTransactionChild.h index cf79f25f1edb..edfa3890579f 100644 --- a/gfx/layers/ipc/ShadowLayersChild.h +++ b/gfx/layers/ipc/LayerTransactionChild.h @@ -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 diff --git a/gfx/layers/ipc/ShadowLayersParent.cpp b/gfx/layers/ipc/LayerTransactionParent.cpp similarity index 89% rename from gfx/layers/ipc/ShadowLayersParent.cpp rename to gfx/layers/ipc/LayerTransactionParent.cpp index 421a9426fb93..058df70e3cbd 100644 --- a/gfx/layers/ipc/ShadowLayersParent.cpp +++ b/gfx/layers/ipc/LayerTransactionParent.cpp @@ -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& cset, - const TargetConfig& targetConfig, - const bool& isFirstPaint) +LayerTransactionParent::RecvUpdateNoSwap(const InfallibleTArray& cset, + const TargetConfig& targetConfig, + const bool& isFirstPaint) { return RecvUpdate(cset, targetConfig, isFirstPaint, nullptr); } bool -ShadowLayersParent::RecvUpdate(const InfallibleTArray& cset, - const TargetConfig& targetConfig, - const bool& isFirstPaint, - InfallibleTArray* reply) +LayerTransactionParent::RecvUpdate(const InfallibleTArray& cset, + const TargetConfig& targetConfig, + const bool& isFirstPaint, + InfallibleTArray* reply) { #ifdef COMPOSITOR_PERFORMANCE_WARNING TimeStamp updateStart = TimeStamp::Now(); @@ -421,7 +421,7 @@ ShadowLayersParent::RecvUpdate(const InfallibleTArray& 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; diff --git a/gfx/layers/ipc/ShadowLayersParent.h b/gfx/layers/ipc/LayerTransactionParent.h similarity index 84% rename from gfx/layers/ipc/ShadowLayersParent.h rename to gfx/layers/ipc/LayerTransactionParent.h index 6e659915ba67..c4ba71c37e4d 100644 --- a/gfx/layers/ipc/ShadowLayersParent.h +++ b/gfx/layers/ipc/LayerTransactionParent.h @@ -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 EditArray; typedef InfallibleTArray 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 diff --git a/gfx/layers/ipc/PCompositable.ipdl b/gfx/layers/ipc/PCompositable.ipdl index eb74b936f54f..26ebf468f52a 100644 --- a/gfx/layers/ipc/PCompositable.ipdl +++ b/gfx/layers/ipc/PCompositable.ipdl @@ -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__(); }; diff --git a/gfx/layers/ipc/PCompositor.ipdl b/gfx/layers/ipc/PCompositor.ipdl index cc31c469f121..cc78eba14ccb 100644 --- a/gfx/layers/ipc/PCompositor.ipdl +++ b/gfx/layers/ipc/PCompositor.ipdl @@ -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); }; diff --git a/gfx/layers/ipc/PGrallocBuffer.ipdl b/gfx/layers/ipc/PGrallocBuffer.ipdl index 15c521121e6c..80ddcce8c85e 100644 --- a/gfx/layers/ipc/PGrallocBuffer.ipdl +++ b/gfx/layers/ipc/PGrallocBuffer.ipdl @@ -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: diff --git a/gfx/layers/ipc/PLayer.ipdl b/gfx/layers/ipc/PLayer.ipdl index 793c503b3f18..4a46b56d6350 100644 --- a/gfx/layers/ipc/PLayer.ipdl +++ b/gfx/layers/ipc/PLayer.ipdl @@ -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 diff --git a/gfx/layers/ipc/PLayers.ipdl b/gfx/layers/ipc/PLayerTransaction.ipdl similarity index 98% rename from gfx/layers/ipc/PLayers.ipdl rename to gfx/layers/ipc/PLayerTransaction.ipdl index f17a3a21b668..566a80a6cef0 100644 --- a/gfx/layers/ipc/PLayers.ipdl +++ b/gfx/layers/ipc/PLayerTransaction.ipdl @@ -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; diff --git a/gfx/layers/ipc/ShadowLayerParent.cpp b/gfx/layers/ipc/ShadowLayerParent.cpp index 5428f1512f4c..4e5bfac86a18 100644 --- a/gfx/layers/ipc/ShadowLayerParent.cpp +++ b/gfx/layers/ipc/ShadowLayerParent.cpp @@ -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 } diff --git a/gfx/layers/ipc/ShadowLayerParent.h b/gfx/layers/ipc/ShadowLayerParent.h index e81747488e59..b13d252cbf0f 100644 --- a/gfx/layers/ipc/ShadowLayerParent.h +++ b/gfx/layers/ipc/ShadowLayerParent.h @@ -16,7 +16,6 @@ namespace layers { class ContainerLayer; class Layer; class LayerManager; -class ShadowLayersParent; class ShadowLayerParent : public PLayerParent { diff --git a/gfx/layers/ipc/ShadowLayerUtilsD3D10.cpp b/gfx/layers/ipc/ShadowLayerUtilsD3D10.cpp index 32352923fad7..749f536fa91f 100644 --- a/gfx/layers/ipc/ShadowLayerUtilsD3D10.cpp +++ b/gfx/layers/ipc/ShadowLayerUtilsD3D10.cpp @@ -8,7 +8,7 @@ #include #include -#include "mozilla/layers/PLayers.h" +#include "mozilla/layers/PLayerTransaction.h" #include "ShadowLayers.h" using namespace mozilla::gl; diff --git a/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp b/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp index 7d7a0180e38c..7332dca17c76 100644 --- a/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp +++ b/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp @@ -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" diff --git a/gfx/layers/ipc/ShadowLayerUtilsMac.cpp b/gfx/layers/ipc/ShadowLayerUtilsMac.cpp index a96ce82f3b35..9c80fefca6c2 100644 --- a/gfx/layers/ipc/ShadowLayerUtilsMac.cpp +++ b/gfx/layers/ipc/ShadowLayerUtilsMac.cpp @@ -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" diff --git a/gfx/layers/ipc/ShadowLayerUtilsX11.cpp b/gfx/layers/ipc/ShadowLayerUtilsX11.cpp index 90563a01030a..b2a23f9027c1 100644 --- a/gfx/layers/ipc/ShadowLayerUtilsX11.cpp +++ b/gfx/layers/ipc/ShadowLayerUtilsX11.cpp @@ -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" diff --git a/gfx/layers/ipc/ShadowLayers.cpp b/gfx/layers/ipc/ShadowLayers.cpp index a3efb27c2aaf..b07a01b99269 100644 --- a/gfx/layers/ipc/ShadowLayers.cpp +++ b/gfx/layers/ipc/ShadowLayers.cpp @@ -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" diff --git a/gfx/layers/ipc/ShadowLayers.h b/gfx/layers/ipc/ShadowLayers.h index bf8441020a76..15f270253302 100644 --- a/gfx/layers/ipc/ShadowLayers.h +++ b/gfx/layers/ipc/ShadowLayers.h @@ -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, diff --git a/gfx/layers/ipc/ShadowLayersManager.h b/gfx/layers/ipc/ShadowLayersManager.h index 7628b8536dd6..f1fa43b313af 100644 --- a/gfx/layers/ipc/ShadowLayersManager.h +++ b/gfx/layers/ipc/ShadowLayersManager.h @@ -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; }; diff --git a/gfx/layers/ipc/ipdl.mk b/gfx/layers/ipc/ipdl.mk index 93803c46610a..95fa93df6d01 100644 --- a/gfx/layers/ipc/ipdl.mk +++ b/gfx/layers/ipc/ipdl.mk @@ -10,5 +10,5 @@ IPDLSRCS = \ PGrallocBuffer.ipdl \ PImageBridge.ipdl \ PLayer.ipdl \ - PLayers.ipdl \ + PLayerTransaction.ipdl \ $(NULL) diff --git a/gfx/layers/moz.build b/gfx/layers/moz.build index b6a52ad82ff1..47da91f65d8b 100644 --- a/gfx/layers/moz.build +++ b/gfx/layers/moz.build @@ -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', diff --git a/gfx/layers/opengl/CanvasLayerOGL.cpp b/gfx/layers/opengl/CanvasLayerOGL.cpp index cb92f7d3ee86..4d7e31bdf548 100644 --- a/gfx/layers/opengl/CanvasLayerOGL.cpp +++ b/gfx/layers/opengl/CanvasLayerOGL.cpp @@ -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" diff --git a/gfx/layers/opengl/ColorLayerOGL.h b/gfx/layers/opengl/ColorLayerOGL.h index a9a5aaec2f2e..0655875a7522 100644 --- a/gfx/layers/opengl/ColorLayerOGL.h +++ b/gfx/layers/opengl/ColorLayerOGL.h @@ -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" diff --git a/gfx/layers/opengl/ImageLayerOGL.h b/gfx/layers/opengl/ImageLayerOGL.h index 7dd7af56a424..8fd2208d0938 100644 --- a/gfx/layers/opengl/ImageLayerOGL.h +++ b/gfx/layers/opengl/ImageLayerOGL.h @@ -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" diff --git a/gfx/layers/opengl/LayerManagerOGL.cpp b/gfx/layers/opengl/LayerManagerOGL.cpp index 0484c76f89a4..aac975a977b5 100644 --- a/gfx/layers/opengl/LayerManagerOGL.cpp +++ b/gfx/layers/opengl/LayerManagerOGL.cpp @@ -5,10 +5,10 @@ #include "LayerManagerOGL.h" -#include "mozilla/layers/PLayers.h" +#include "mozilla/layers/PLayerTransaction.h" #include -/* 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" diff --git a/gfx/layers/opengl/ThebesLayerOGL.cpp b/gfx/layers/opengl/ThebesLayerOGL.cpp index 078f74b15caa..1eff5e30d065 100644 --- a/gfx/layers/opengl/ThebesLayerOGL.cpp +++ b/gfx/layers/opengl/ThebesLayerOGL.cpp @@ -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" diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index f9dd66bdb457..bcc80bf51022 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -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" diff --git a/layout/ipc/PRenderFrame.ipdl b/layout/ipc/PRenderFrame.ipdl index dd5a17eb75ab..1e7bd6975e8a 100644 --- a/layout/ipc/PRenderFrame.ipdl +++ b/layout/ipc/PRenderFrame.ipdl @@ -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__; diff --git a/layout/ipc/RenderFrameChild.cpp b/layout/ipc/RenderFrameChild.cpp index 93cd0a626e4e..c910495d971e 100644 --- a/layout/ipc/RenderFrameChild.cpp +++ b/layout/ipc/RenderFrameChild.cpp @@ -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(ManagedPLayersChild()[0]); + LayerTransactionChild* layers = + static_cast(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; diff --git a/layout/ipc/RenderFrameChild.h b/layout/ipc/RenderFrameChild.h index 832c4e1fe7d3..3cfb32d49959 100644 --- a/layout/ipc/RenderFrameChild.h +++ b/layout/ipc/RenderFrameChild.h @@ -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 diff --git a/layout/ipc/RenderFrameParent.cpp b/layout/ipc/RenderFrameParent.cpp index b2b5ab2968c4..fd3460a247ae 100644 --- a/layout/ipc/RenderFrameParent.cpp +++ b/layout/ipc/RenderFrameParent.cpp @@ -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(ManagedPLayersParent()[0]); + LayerTransactionParent* layers = + static_cast(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 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& shadowParents = ManagedPLayersParent(); + const InfallibleTArray& 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(shadowParents[0]) : nullptr; + static_cast(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; } diff --git a/layout/ipc/RenderFrameParent.h b/layout/ipc/RenderFrameParent.h index caee18c5afda..359cf7e87b3d 100644 --- a/layout/ipc/RenderFrameParent.h +++ b/layout/ipc/RenderFrameParent.h @@ -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; diff --git a/widget/android/nsWindow.cpp b/widget/android/nsWindow.cpp index 95db3c835baf..32f88e2fb892 100644 --- a/widget/android/nsWindow.cpp +++ b/widget/android/nsWindow.cpp @@ -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 { diff --git a/widget/android/nsWindow.h b/widget/android/nsWindow.h index e8bc76661ee0..418a0df48157 100644 --- a/widget/android/nsWindow.h +++ b/widget/android/nsWindow.h @@ -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); diff --git a/widget/cocoa/nsCocoaWindow.h b/widget/cocoa/nsCocoaWindow.h index fe8ade980b16..5d6138cdd718 100644 --- a/widget/cocoa/nsCocoaWindow.h +++ b/widget/cocoa/nsCocoaWindow.h @@ -255,7 +255,7 @@ public: NS_IMETHOD Invalidate(const nsIntRect &aRect); virtual nsresult ConfigureChildren(const nsTArray& 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); diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm index 136518eaade9..36bdc5c97da1 100644 --- a/widget/cocoa/nsCocoaWindow.mm +++ b/widget/cocoa/nsCocoaWindow.mm @@ -993,7 +993,7 @@ nsCocoaWindow::ConfigureChildren(const nsTArray& aConfigurations) } LayerManager* -nsCocoaWindow::GetLayerManager(PLayersChild* aShadowManager, +nsCocoaWindow::GetLayerManager(PLayerTransactionChild* aShadowManager, LayersBackend aBackendHint, LayerManagerPersistence aPersistence, bool* aAllowRetaining) diff --git a/widget/gonk/HwcComposer2D.cpp b/widget/gonk/HwcComposer2D.cpp index f60bc6abccb0..4ac076be236d 100644 --- a/widget/gonk/HwcComposer2D.cpp +++ b/widget/gonk/HwcComposer2D.cpp @@ -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" diff --git a/widget/gonk/nsWindow.cpp b/widget/gonk/nsWindow.cpp index 6a2b95005af1..b28b594fd04b 100644 --- a/widget/gonk/nsWindow.cpp +++ b/widget/gonk/nsWindow.cpp @@ -539,7 +539,7 @@ nsWindow::GetDPI() } LayerManager * -nsWindow::GetLayerManager(PLayersChild* aShadowManager, +nsWindow::GetLayerManager(PLayerTransactionChild* aShadowManager, LayersBackend aBackendHint, LayerManagerPersistence aPersistence, bool* aAllowRetaining) diff --git a/widget/gonk/nsWindow.h b/widget/gonk/nsWindow.h index ccaf13e8ecf1..d3acd5a896cf 100644 --- a/widget/gonk/nsWindow.h +++ b/widget/gonk/nsWindow.h @@ -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); diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp index 59a7a61867e5..2e19a7461de4 100644 --- a/widget/gtk2/nsWindow.cpp +++ b/widget/gtk2/nsWindow.cpp @@ -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) diff --git a/widget/gtk2/nsWindow.h b/widget/gtk2/nsWindow.h index eda1c932f648..c2507f4ac452 100644 --- a/widget/gtk2/nsWindow.h +++ b/widget/gtk2/nsWindow.h @@ -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; diff --git a/widget/nsIWidget.h b/widget/nsIWidget.h index 695eef09538e..ae47ce480698 100644 --- a/widget/nsIWidget.h +++ b/widget/nsIWidget.h @@ -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; diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp index eec90bd7790b..8def375016db 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -3210,7 +3210,7 @@ nsWindow::ShouldUseOffMainThreadCompositing() } LayerManager* -nsWindow::GetLayerManager(PLayersChild* aShadowManager, +nsWindow::GetLayerManager(PLayerTransactionChild* aShadowManager, LayersBackend aBackendHint, LayerManagerPersistence aPersistence, bool* aAllowRetaining) diff --git a/widget/windows/nsWindow.h b/widget/windows/nsWindow.h index a717819ccca5..4fee69eecbe0 100644 --- a/widget/windows/nsWindow.h +++ b/widget/windows/nsWindow.h @@ -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); diff --git a/widget/windows/winrt/MetroWidget.cpp b/widget/windows/winrt/MetroWidget.cpp index d41478fe1530..095cb6314e9a 100644 --- a/widget/windows/winrt/MetroWidget.cpp +++ b/widget/windows/winrt/MetroWidget.cpp @@ -793,7 +793,7 @@ MetroWidget::ShouldUseBasicManager() } LayerManager* -MetroWidget::GetLayerManager(PLayersChild* aShadowManager, +MetroWidget::GetLayerManager(PLayerTransactionChild* aShadowManager, LayersBackend aBackendHint, LayerManagerPersistence aPersistence, bool* aAllowRetaining) diff --git a/widget/windows/winrt/MetroWidget.h b/widget/windows/winrt/MetroWidget.h index 6c8793dd747b..68b84936e67d 100644 --- a/widget/windows/winrt/MetroWidget.h +++ b/widget/windows/winrt/MetroWidget.h @@ -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); diff --git a/widget/xpwidgets/PuppetWidget.cpp b/widget/xpwidgets/PuppetWidget.cpp index b540b2752f17..a78dc81b123b 100644 --- a/widget/xpwidgets/PuppetWidget.cpp +++ b/widget/xpwidgets/PuppetWidget.cpp @@ -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) diff --git a/widget/xpwidgets/PuppetWidget.h b/widget/xpwidgets/PuppetWidget.h index 983c14ea5594..e2c46077fbd3 100644 --- a/widget/xpwidgets/PuppetWidget.h +++ b/widget/xpwidgets/PuppetWidget.h @@ -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); diff --git a/widget/xpwidgets/nsBaseWidget.cpp b/widget/xpwidgets/nsBaseWidget.cpp index 7ec349b720be..3414510eb680 100644 --- a/widget/xpwidgets/nsBaseWidget.cpp +++ b/widget/xpwidgets/nsBaseWidget.cpp @@ -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) diff --git a/widget/xpwidgets/nsBaseWidget.h b/widget/xpwidgets/nsBaseWidget.h index cee1ffb12dc8..434fd6dca5f0 100644 --- a/widget/xpwidgets/nsBaseWidget.h +++ b/widget/xpwidgets/nsBaseWidget.h @@ -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);