mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
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:
parent
846945f3f9
commit
a1ee3bf807
@ -21,7 +21,7 @@
|
|||||||
#include "mozilla/ipc/FileDescriptorUtils.h"
|
#include "mozilla/ipc/FileDescriptorUtils.h"
|
||||||
#include "mozilla/layers/AsyncPanZoomController.h"
|
#include "mozilla/layers/AsyncPanZoomController.h"
|
||||||
#include "mozilla/layers/CompositorChild.h"
|
#include "mozilla/layers/CompositorChild.h"
|
||||||
#include "mozilla/layers/PLayersChild.h"
|
#include "mozilla/layers/PLayerTransactionChild.h"
|
||||||
#include "mozilla/layout/RenderFrameChild.h"
|
#include "mozilla/layout/RenderFrameChild.h"
|
||||||
#include "mozilla/StaticPtr.h"
|
#include "mozilla/StaticPtr.h"
|
||||||
#include "mozilla/unused.h"
|
#include "mozilla/unused.h"
|
||||||
@ -2095,7 +2095,7 @@ TabChild::InitRenderingState()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
PLayersChild* shadowManager = nullptr;
|
PLayerTransactionChild* shadowManager = nullptr;
|
||||||
if (id != 0) {
|
if (id != 0) {
|
||||||
// Pushing layers transactions directly to a separate
|
// Pushing layers transactions directly to a separate
|
||||||
// compositor context.
|
// compositor context.
|
||||||
@ -2105,11 +2105,11 @@ TabChild::InitRenderingState()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
shadowManager =
|
shadowManager =
|
||||||
compositorChild->SendPLayersConstructor(textureFactoryIdentifier.mParentBackend,
|
compositorChild->SendPLayerTransactionConstructor(textureFactoryIdentifier.mParentBackend,
|
||||||
id, &textureFactoryIdentifier);
|
id, &textureFactoryIdentifier);
|
||||||
} else {
|
} else {
|
||||||
// Pushing transactions to the parent content.
|
// Pushing transactions to the parent content.
|
||||||
shadowManager = remoteFrame->SendPLayersConstructor();
|
shadowManager = remoteFrame->SendPLayerTransactionConstructor();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!shadowManager) {
|
if (!shadowManager) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "base/basictypes.h"
|
#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 "mozilla/Util.h"
|
||||||
|
|
||||||
#include "prmem.h"
|
#include "prmem.h"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "mozilla/DebugOnly.h"
|
#include "mozilla/DebugOnly.h"
|
||||||
|
|
||||||
#include "mozilla/layers/PLayers.h"
|
#include "mozilla/layers/PLayerTransaction.h"
|
||||||
#include "mozilla/layers/ShadowLayers.h"
|
#include "mozilla/layers/ShadowLayers.h"
|
||||||
#include "mozilla/Telemetry.h"
|
#include "mozilla/Telemetry.h"
|
||||||
|
|
||||||
|
@ -114,9 +114,9 @@ CPPSRCS += \
|
|||||||
ImageBridgeParent.cpp \
|
ImageBridgeParent.cpp \
|
||||||
ShadowLayers.cpp \
|
ShadowLayers.cpp \
|
||||||
ShadowLayerChild.cpp \
|
ShadowLayerChild.cpp \
|
||||||
ShadowLayersChild.cpp \
|
|
||||||
ShadowLayerParent.cpp \
|
ShadowLayerParent.cpp \
|
||||||
ShadowLayersParent.cpp \
|
LayerTransactionChild.cpp \
|
||||||
|
LayerTransactionParent.cpp \
|
||||||
SharedPlanarYCbCrImage.cpp \
|
SharedPlanarYCbCrImage.cpp \
|
||||||
ShmemYCbCrImage.cpp \
|
ShmemYCbCrImage.cpp \
|
||||||
SharedRGBImage.cpp \
|
SharedRGBImage.cpp \
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* 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 "BasicCanvasLayer.h"
|
||||||
#include "gfxImageSurface.h"
|
#include "gfxImageSurface.h"
|
||||||
#include "GLContext.h"
|
#include "GLContext.h"
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* 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 "BasicLayersImpl.h"
|
||||||
|
|
||||||
using namespace mozilla::gfx;
|
using namespace mozilla::gfx;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* 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 "BasicLayersImpl.h"
|
||||||
#include "SharedTextureImage.h"
|
#include "SharedTextureImage.h"
|
||||||
#include "gfxUtils.h"
|
#include "gfxUtils.h"
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
#include "mozilla/dom/TabChild.h"
|
#include "mozilla/dom/TabChild.h"
|
||||||
#include "mozilla/Hal.h"
|
#include "mozilla/Hal.h"
|
||||||
#include "mozilla/layers/PLayerChild.h"
|
#include "mozilla/layers/PLayerChild.h"
|
||||||
#include "mozilla/layers/PLayersChild.h"
|
#include "mozilla/layers/PLayerTransactionChild.h"
|
||||||
#include "mozilla/layers/PLayersParent.h"
|
#include "mozilla/layers/PLayerTransactionParent.h"
|
||||||
|
|
||||||
#include "gfxSharedImageSurface.h"
|
#include "gfxSharedImageSurface.h"
|
||||||
#include "gfxImageSurface.h"
|
#include "gfxImageSurface.h"
|
||||||
@ -1333,7 +1333,7 @@ void
|
|||||||
BasicShadowLayerManager::ClearCachedResources(Layer* aSubtree)
|
BasicShadowLayerManager::ClearCachedResources(Layer* aSubtree)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(!HasShadowManager() || !aSubtree);
|
MOZ_ASSERT(!HasShadowManager() || !aSubtree);
|
||||||
if (PLayersChild* manager = GetShadowManager()) {
|
if (PLayerTransactionChild* manager = GetShadowManager()) {
|
||||||
manager->SendClearCachedResources();
|
manager->SendClearCachedResources();
|
||||||
}
|
}
|
||||||
BasicLayerManager::ClearCachedResources(aSubtree);
|
BasicLayerManager::ClearCachedResources(aSubtree);
|
||||||
|
@ -183,7 +183,7 @@ protected:
|
|||||||
nsRefPtr<gfxContext> mTarget;
|
nsRefPtr<gfxContext> mTarget;
|
||||||
// When we're doing a transaction in order to draw to a non-default
|
// 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
|
// 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
|
// mShadowTarget, and then perform the transaction using
|
||||||
// mDummyTarget as the render target. After the transaction ends,
|
// mDummyTarget as the render target. After the transaction ends,
|
||||||
// we send a message to our remote side to capture the actual pixels
|
// we send a message to our remote side to capture the actual pixels
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include "mozilla/DebugOnly.h"
|
#include "mozilla/DebugOnly.h"
|
||||||
|
|
||||||
#include "BasicLayersImpl.h"
|
#include "BasicLayersImpl.h"
|
||||||
#include "mozilla/layers/PLayers.h"
|
#include "mozilla/layers/PLayerTransaction.h"
|
||||||
|
|
||||||
using namespace mozilla::gfx;
|
using namespace mozilla::gfx;
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#ifndef GFX_BASICTHEBESLAYER_H
|
#ifndef GFX_BASICTHEBESLAYER_H
|
||||||
#define GFX_BASICTHEBESLAYER_H
|
#define GFX_BASICTHEBESLAYER_H
|
||||||
|
|
||||||
#include "mozilla/layers/PLayersParent.h"
|
#include "mozilla/layers/PLayerTransactionParent.h"
|
||||||
#include "BasicLayersImpl.h"
|
#include "BasicLayersImpl.h"
|
||||||
#include "mozilla/layers/ContentClient.h"
|
#include "mozilla/layers/ContentClient.h"
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
* 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/. */
|
* 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 "BasicTiledThebesLayer.h"
|
||||||
#include "gfxImageSurface.h"
|
#include "gfxImageSurface.h"
|
||||||
#include "GeckoProfiler.h"
|
#include "GeckoProfiler.h"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include "mozilla/layers/CompositableClient.h"
|
#include "mozilla/layers/CompositableClient.h"
|
||||||
#include "mozilla/layers/TextureClient.h"
|
#include "mozilla/layers/TextureClient.h"
|
||||||
#include "mozilla/layers/TextureClientOGL.h"
|
#include "mozilla/layers/TextureClientOGL.h"
|
||||||
#include "mozilla/layers/ShadowLayersChild.h"
|
#include "mozilla/layers/LayerTransactionChild.h"
|
||||||
#include "mozilla/layers/CompositableForwarder.h"
|
#include "mozilla/layers/CompositableForwarder.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
@ -16,7 +16,6 @@ namespace layers {
|
|||||||
class CompositableChild;
|
class CompositableChild;
|
||||||
class CompositableClient;
|
class CompositableClient;
|
||||||
class TextureClient;
|
class TextureClient;
|
||||||
class ShadowLayersChild;
|
|
||||||
class ImageBridgeChild;
|
class ImageBridgeChild;
|
||||||
class ShadowableLayer;
|
class ShadowableLayer;
|
||||||
class CompositableForwarder;
|
class CompositableForwarder;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "ipc/AutoOpenSurface.h"
|
#include "ipc/AutoOpenSurface.h"
|
||||||
#include "mozilla/layers/PLayers.h"
|
#include "mozilla/layers/PLayerTransaction.h"
|
||||||
#include "mozilla/layers/ShadowLayers.h"
|
#include "mozilla/layers/ShadowLayers.h"
|
||||||
#include "mozilla/layers/CompositorTypes.h" // for TextureInfo
|
#include "mozilla/layers/CompositorTypes.h" // for TextureInfo
|
||||||
#include "mozilla/layers/Effects.h"
|
#include "mozilla/layers/Effects.h"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#ifndef GFX_ColorLayerComposite_H
|
#ifndef GFX_ColorLayerComposite_H
|
||||||
#define GFX_ColorLayerComposite_H
|
#define GFX_ColorLayerComposite_H
|
||||||
|
|
||||||
#include "mozilla/layers/PLayers.h"
|
#include "mozilla/layers/PLayerTransaction.h"
|
||||||
#include "mozilla/layers/ShadowLayers.h"
|
#include "mozilla/layers/ShadowLayers.h"
|
||||||
|
|
||||||
#include "LayerManagerComposite.h"
|
#include "LayerManagerComposite.h"
|
||||||
|
@ -233,12 +233,12 @@ private:
|
|||||||
* the layer.
|
* the layer.
|
||||||
*
|
*
|
||||||
* CompositableMap must be global because the image bridge doesn't have any
|
* 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
|
* 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
|
* both query (in the same thread). The map is not allocated the map on the
|
||||||
* stack to avoid the badness of static initialization.
|
* 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
|
* 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
|
* 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
|
* given layer manager on the compositor thread except the image bridge and the
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#ifndef GFX_ContainerLayerComposite_H
|
#ifndef GFX_ContainerLayerComposite_H
|
||||||
#define GFX_ContainerLayerComposite_H
|
#define GFX_ContainerLayerComposite_H
|
||||||
|
|
||||||
#include "mozilla/layers/PLayers.h"
|
#include "mozilla/layers/PLayerTransaction.h"
|
||||||
#include "mozilla/layers/ShadowLayers.h"
|
#include "mozilla/layers/ShadowLayers.h"
|
||||||
|
|
||||||
#include "Layers.h"
|
#include "Layers.h"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#ifndef GFX_ImageLayerComposite_H
|
#ifndef GFX_ImageLayerComposite_H
|
||||||
#define GFX_ImageLayerComposite_H
|
#define GFX_ImageLayerComposite_H
|
||||||
|
|
||||||
#include "mozilla/layers/PLayers.h"
|
#include "mozilla/layers/PLayerTransaction.h"
|
||||||
#include "mozilla/layers/ShadowLayers.h"
|
#include "mozilla/layers/ShadowLayers.h"
|
||||||
|
|
||||||
#include "LayerManagerComposite.h"
|
#include "LayerManagerComposite.h"
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* 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 "mozilla/Util.h"
|
||||||
|
|
||||||
#include "LayerManagerComposite.h"
|
#include "LayerManagerComposite.h"
|
||||||
|
@ -17,6 +17,14 @@
|
|||||||
|
|
||||||
#include "gfxContext.h"
|
#include "gfxContext.h"
|
||||||
#include "gfx3DMatrix.h"
|
#include "gfx3DMatrix.h"
|
||||||
|
#include "GLDefs.h"
|
||||||
|
|
||||||
|
namespace mozilla {
|
||||||
|
namespace gl {
|
||||||
|
class GLContext;
|
||||||
|
class TextureImage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace layers {
|
namespace layers {
|
||||||
|
@ -4,10 +4,11 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "ipc/AutoOpenSurface.h"
|
#include "ipc/AutoOpenSurface.h"
|
||||||
#include "mozilla/layers/PLayers.h"
|
#include "mozilla/layers/PLayerTransaction.h"
|
||||||
#include "TiledLayerBuffer.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/Util.h"
|
||||||
|
|
||||||
#include "mozilla/layers/ShadowLayers.h"
|
#include "mozilla/layers/ShadowLayers.h"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#ifndef GFX_ThebesLayerComposite_H
|
#ifndef GFX_ThebesLayerComposite_H
|
||||||
#define GFX_ThebesLayerComposite_H
|
#define GFX_ThebesLayerComposite_H
|
||||||
|
|
||||||
#include "mozilla/layers/PLayers.h"
|
#include "mozilla/layers/PLayerTransaction.h"
|
||||||
#include "mozilla/layers/ShadowLayers.h"
|
#include "mozilla/layers/ShadowLayers.h"
|
||||||
|
|
||||||
#include "Layers.h"
|
#include "Layers.h"
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* 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 "mozilla/Util.h"
|
||||||
|
|
||||||
#include "ThebesLayerD3D10.h"
|
#include "ThebesLayerD3D10.h"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "ipc/AutoOpenSurface.h"
|
#include "ipc/AutoOpenSurface.h"
|
||||||
#include "mozilla/layers/PLayers.h"
|
#include "mozilla/layers/PLayerTransaction.h"
|
||||||
|
|
||||||
#include "gfxImageSurface.h"
|
#include "gfxImageSurface.h"
|
||||||
#include "gfxWindowsSurface.h"
|
#include "gfxWindowsSurface.h"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "ipc/AutoOpenSurface.h"
|
#include "ipc/AutoOpenSurface.h"
|
||||||
#include "mozilla/layers/PLayers.h"
|
#include "mozilla/layers/PLayerTransaction.h"
|
||||||
#include "gfxSharedImageSurface.h"
|
#include "gfxSharedImageSurface.h"
|
||||||
|
|
||||||
#include "ImageLayerD3D9.h"
|
#include "ImageLayerD3D9.h"
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* 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 "mozilla/Util.h"
|
||||||
|
|
||||||
#include "ipc/AutoOpenSurface.h"
|
#include "ipc/AutoOpenSurface.h"
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include "base/basictypes.h"
|
#include "base/basictypes.h"
|
||||||
|
|
||||||
#include "gfxASurface.h"
|
#include "gfxASurface.h"
|
||||||
#include "mozilla/layers/PLayers.h"
|
#include "mozilla/layers/PLayerTransaction.h"
|
||||||
#include "ShadowLayers.h"
|
#include "ShadowLayers.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
#include "CompositorChild.h"
|
#include "CompositorChild.h"
|
||||||
#include "CompositorParent.h"
|
#include "CompositorParent.h"
|
||||||
#include "LayerManagerOGL.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 mozilla {
|
||||||
namespace layers {
|
namespace layers {
|
||||||
@ -32,9 +32,9 @@ CompositorChild::Destroy()
|
|||||||
{
|
{
|
||||||
mLayerManager->Destroy();
|
mLayerManager->Destroy();
|
||||||
mLayerManager = NULL;
|
mLayerManager = NULL;
|
||||||
while (size_t len = ManagedPLayersChild().Length()) {
|
while (size_t len = ManagedPLayerTransactionChild().Length()) {
|
||||||
ShadowLayersChild* layers =
|
LayerTransactionChild* layers =
|
||||||
static_cast<ShadowLayersChild*>(ManagedPLayersChild()[len - 1]);
|
static_cast<LayerTransactionChild*>(ManagedPLayerTransactionChild()[len - 1]);
|
||||||
layers->Destroy();
|
layers->Destroy();
|
||||||
}
|
}
|
||||||
SendStop();
|
SendStop();
|
||||||
@ -70,16 +70,16 @@ CompositorChild::Get()
|
|||||||
return sCompositor;
|
return sCompositor;
|
||||||
}
|
}
|
||||||
|
|
||||||
PLayersChild*
|
PLayerTransactionChild*
|
||||||
CompositorChild::AllocPLayers(const LayersBackend& aBackendHint,
|
CompositorChild::AllocPLayerTransaction(const LayersBackend& aBackendHint,
|
||||||
const uint64_t& aId,
|
const uint64_t& aId,
|
||||||
TextureFactoryIdentifier* aTextureFactoryIdentifier)
|
TextureFactoryIdentifier*)
|
||||||
{
|
{
|
||||||
return new ShadowLayersChild();
|
return new LayerTransactionChild();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
CompositorChild::DeallocPLayers(PLayersChild* actor)
|
CompositorChild::DeallocPLayerTransaction(PLayerTransactionChild* actor)
|
||||||
{
|
{
|
||||||
delete actor;
|
delete actor;
|
||||||
return true;
|
return true;
|
||||||
|
@ -38,10 +38,12 @@ public:
|
|||||||
|
|
||||||
static bool ChildProcessHasCompositor() { return sCompositor != nullptr; }
|
static bool ChildProcessHasCompositor() { return sCompositor != nullptr; }
|
||||||
protected:
|
protected:
|
||||||
virtual PLayersChild* AllocPLayers(const LayersBackend& aBackendHint,
|
virtual PLayerTransactionChild*
|
||||||
const uint64_t& aId,
|
AllocPLayerTransaction(const LayersBackend& aBackendHint,
|
||||||
TextureFactoryIdentifier* aTextureFactoryIdentifier) MOZ_OVERRIDE;
|
const uint64_t& aId,
|
||||||
virtual bool DeallocPLayers(PLayersChild *aChild) MOZ_OVERRIDE;
|
TextureFactoryIdentifier* aTextureFactoryIdentifier) MOZ_OVERRIDE;
|
||||||
|
|
||||||
|
virtual bool DeallocPLayerTransaction(PLayerTransactionChild *aChild) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
|
virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
#include "nsIWidget.h"
|
#include "nsIWidget.h"
|
||||||
#include "RenderTrace.h"
|
#include "RenderTrace.h"
|
||||||
#include "ShadowLayersParent.h"
|
#include "LayerTransactionParent.h"
|
||||||
#include "BasicLayers.h"
|
#include "BasicLayers.h"
|
||||||
#include "nsIWidget.h"
|
#include "nsIWidget.h"
|
||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
@ -207,8 +207,8 @@ CompositorParent::~CompositorParent()
|
|||||||
void
|
void
|
||||||
CompositorParent::Destroy()
|
CompositorParent::Destroy()
|
||||||
{
|
{
|
||||||
NS_ABORT_IF_FALSE(ManagedPLayersParent().Length() == 0,
|
NS_ABORT_IF_FALSE(ManagedPLayerTransactionParent().Length() == 0,
|
||||||
"CompositorParent destroyed before managed PLayersParent");
|
"CompositorParent destroyed before managed PLayerTransactionParent");
|
||||||
|
|
||||||
// Ensure that the layer manager is destructed on the compositor thread.
|
// Ensure that the layer manager is destructed on the compositor thread.
|
||||||
mLayerManager = NULL;
|
mLayerManager = NULL;
|
||||||
@ -688,7 +688,7 @@ CompositorParent::TransformFixedLayers(Layer* aLayer,
|
|||||||
static void
|
static void
|
||||||
SetShadowProperties(Layer* aLayer)
|
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();
|
ShadowLayer* shadow = aLayer->AsShadowLayer();
|
||||||
// Set the shadow's base transform to the layer's base transform.
|
// Set the shadow's base transform to the layer's base transform.
|
||||||
shadow->SetShadowTransform(aLayer->GetBaseTransform());
|
shadow->SetShadowTransform(aLayer->GetBaseTransform());
|
||||||
@ -1037,7 +1037,7 @@ CompositorParent::TransformShadowTree(TimeStamp aCurrentFrame)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CompositorParent::ShadowLayersUpdated(ShadowLayersParent* aLayerTree,
|
CompositorParent::ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
|
||||||
const TargetConfig& aTargetConfig,
|
const TargetConfig& aTargetConfig,
|
||||||
bool isFirstPaint)
|
bool isFirstPaint)
|
||||||
{
|
{
|
||||||
@ -1099,10 +1099,10 @@ CompositorParent::SyncViewportInfo(const nsIntRect& aDisplayPort,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
PLayersParent*
|
PLayerTransactionParent*
|
||||||
CompositorParent::AllocPLayers(const LayersBackend& aBackendHint,
|
CompositorParent::AllocPLayerTransaction(const LayersBackend& aBackendHint,
|
||||||
const uint64_t& aId,
|
const uint64_t& aId,
|
||||||
TextureFactoryIdentifier* aTextureFactoryIdentifier)
|
TextureFactoryIdentifier* aTextureFactoryIdentifier)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(aId == 0);
|
MOZ_ASSERT(aId == 0);
|
||||||
|
|
||||||
@ -1126,7 +1126,7 @@ CompositorParent::AllocPLayers(const LayersBackend& aBackendHint,
|
|||||||
}
|
}
|
||||||
|
|
||||||
*aTextureFactoryIdentifier = mLayerManager->GetTextureFactoryIdentifier();
|
*aTextureFactoryIdentifier = mLayerManager->GetTextureFactoryIdentifier();
|
||||||
return new ShadowLayersParent(mLayerManager, this, 0);
|
return new LayerTransactionParent(mLayerManager, this, 0);
|
||||||
// Basic layers compositor not yet implemented
|
// Basic layers compositor not yet implemented
|
||||||
/*} else if (aBackendHint == mozilla::layers::LAYERS_BASIC) {
|
/*} else if (aBackendHint == mozilla::layers::LAYERS_BASIC) {
|
||||||
nsRefPtr<LayerManager> layerManager = new BasicShadowLayerManager(mWidget);
|
nsRefPtr<LayerManager> layerManager = new BasicShadowLayerManager(mWidget);
|
||||||
@ -1137,7 +1137,7 @@ CompositorParent::AllocPLayers(const LayersBackend& aBackendHint,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
*aTextureFactoryIdentifier = layerManager->GetTextureFactoryIdentifier();
|
*aTextureFactoryIdentifier = layerManager->GetTextureFactoryIdentifier();
|
||||||
return new ShadowLayersParent(slm, this, 0); */
|
return new LayerTransactionParent(slm, this, 0); */
|
||||||
} else {
|
} else {
|
||||||
NS_ERROR("Unsupported backend selected for Async Compositor");
|
NS_ERROR("Unsupported backend selected for Async Compositor");
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -1145,7 +1145,7 @@ CompositorParent::AllocPLayers(const LayersBackend& aBackendHint,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
CompositorParent::DeallocPLayers(PLayersParent* actor)
|
CompositorParent::DeallocPLayerTransaction(PLayerTransactionParent* actor)
|
||||||
{
|
{
|
||||||
delete actor;
|
delete actor;
|
||||||
return true;
|
return true;
|
||||||
@ -1280,12 +1280,14 @@ public:
|
|||||||
SurfaceDescriptor* aOutSnapshot)
|
SurfaceDescriptor* aOutSnapshot)
|
||||||
{ return true; }
|
{ return true; }
|
||||||
|
|
||||||
virtual PLayersParent* AllocPLayers(const LayersBackend& aBackendType,
|
virtual PLayerTransactionParent*
|
||||||
const uint64_t& aId,
|
AllocPLayerTransaction(const LayersBackend& aBackendType,
|
||||||
TextureFactoryIdentifier* aTextureFactoryIdentifier) MOZ_OVERRIDE;
|
const uint64_t& aId,
|
||||||
virtual bool DeallocPLayers(PLayersParent* aLayers) MOZ_OVERRIDE;
|
TextureFactoryIdentifier* aTextureFactoryIdentifier) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void ShadowLayersUpdated(ShadowLayersParent* aLayerTree,
|
virtual bool DeallocPLayerTransaction(PLayerTransactionParent* aLayers) MOZ_OVERRIDE;
|
||||||
|
|
||||||
|
virtual void ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
|
||||||
const TargetConfig& aTargetConfig,
|
const TargetConfig& aTargetConfig,
|
||||||
bool isFirstPaint) MOZ_OVERRIDE;
|
bool isFirstPaint) MOZ_OVERRIDE;
|
||||||
|
|
||||||
@ -1364,22 +1366,22 @@ CrossProcessCompositorParent::ActorDestroy(ActorDestroyReason aWhy)
|
|||||||
NewRunnableMethod(this, &CrossProcessCompositorParent::DeferredDestroy));
|
NewRunnableMethod(this, &CrossProcessCompositorParent::DeferredDestroy));
|
||||||
}
|
}
|
||||||
|
|
||||||
PLayersParent*
|
PLayerTransactionParent*
|
||||||
CrossProcessCompositorParent::AllocPLayers(const LayersBackend& aBackendType,
|
CrossProcessCompositorParent::AllocPLayerTransaction(const LayersBackend& aBackendType,
|
||||||
const uint64_t& aId,
|
const uint64_t& aId,
|
||||||
TextureFactoryIdentifier* aTextureFactoryIdentifier)
|
TextureFactoryIdentifier* aTextureFactoryIdentifier)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(aId != 0);
|
MOZ_ASSERT(aId != 0);
|
||||||
|
|
||||||
nsRefPtr<LayerManager> lm = sCurrentCompositor->GetLayerManager();
|
nsRefPtr<LayerManager> lm = sCurrentCompositor->GetLayerManager();
|
||||||
*aTextureFactoryIdentifier = lm->GetTextureFactoryIdentifier();
|
*aTextureFactoryIdentifier = lm->GetTextureFactoryIdentifier();
|
||||||
return new ShadowLayersParent(lm->AsShadowManager(), this, aId);
|
return new LayerTransactionParent(lm->AsShadowManager(), this, aId);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
CrossProcessCompositorParent::DeallocPLayers(PLayersParent* aLayers)
|
CrossProcessCompositorParent::DeallocPLayerTransaction(PLayerTransactionParent* aLayers)
|
||||||
{
|
{
|
||||||
ShadowLayersParent* slp = static_cast<ShadowLayersParent*>(aLayers);
|
LayerTransactionParent* slp = static_cast<LayerTransactionParent*>(aLayers);
|
||||||
RemoveIndirectTree(slp->GetId());
|
RemoveIndirectTree(slp->GetId());
|
||||||
delete aLayers;
|
delete aLayers;
|
||||||
return true;
|
return true;
|
||||||
@ -1387,7 +1389,7 @@ CrossProcessCompositorParent::DeallocPLayers(PLayersParent* aLayers)
|
|||||||
|
|
||||||
void
|
void
|
||||||
CrossProcessCompositorParent::ShadowLayersUpdated(
|
CrossProcessCompositorParent::ShadowLayersUpdated(
|
||||||
ShadowLayersParent* aLayerTree,
|
LayerTransactionParent* aLayerTree,
|
||||||
const TargetConfig& aTargetConfig,
|
const TargetConfig& aTargetConfig,
|
||||||
bool isFirstPaint)
|
bool isFirstPaint)
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
//#define COMPOSITOR_PERFORMANCE_WARNING
|
//#define COMPOSITOR_PERFORMANCE_WARNING
|
||||||
|
|
||||||
#include "mozilla/layers/PCompositorParent.h"
|
#include "mozilla/layers/PCompositorParent.h"
|
||||||
#include "mozilla/layers/PLayersParent.h"
|
#include "mozilla/layers/PLayerTransactionParent.h"
|
||||||
#include "base/thread.h"
|
#include "base/thread.h"
|
||||||
#include "mozilla/Monitor.h"
|
#include "mozilla/Monitor.h"
|
||||||
#include "mozilla/TimeStamp.h"
|
#include "mozilla/TimeStamp.h"
|
||||||
@ -76,7 +76,7 @@ public:
|
|||||||
|
|
||||||
virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
|
virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual void ShadowLayersUpdated(ShadowLayersParent* aLayerTree,
|
virtual void ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
|
||||||
const TargetConfig& aTargetConfig,
|
const TargetConfig& aTargetConfig,
|
||||||
bool isFirstPaint) MOZ_OVERRIDE;
|
bool isFirstPaint) MOZ_OVERRIDE;
|
||||||
/**
|
/**
|
||||||
@ -168,10 +168,11 @@ public:
|
|||||||
PlatformThreadId aThreadID);
|
PlatformThreadId aThreadID);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual PLayersParent* AllocPLayers(const LayersBackend& aBackendHint,
|
virtual PLayerTransactionParent*
|
||||||
const uint64_t& aId,
|
AllocPLayerTransaction(const LayersBackend& aBackendHint,
|
||||||
TextureFactoryIdentifier* aTextureFactoryIdentifier);
|
const uint64_t& aId,
|
||||||
virtual bool DeallocPLayers(PLayersParent* aLayers);
|
TextureFactoryIdentifier* aTextureFactoryIdentifier);
|
||||||
|
virtual bool DeallocPLayerTransaction(PLayerTransactionParent* aLayers);
|
||||||
virtual void ScheduleTask(CancelableTask*, int);
|
virtual void ScheduleTask(CancelableTask*, int);
|
||||||
virtual void Composite();
|
virtual void Composite();
|
||||||
virtual void ComposeToTarget(gfxContext* aTarget);
|
virtual void ComposeToTarget(gfxContext* aTarget);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "ShadowLayerChild.h"
|
#include "ShadowLayerChild.h"
|
||||||
#include "ShadowLayersChild.h"
|
#include "LayerTransactionChild.h"
|
||||||
#include "ShadowLayerUtils.h"
|
#include "ShadowLayerUtils.h"
|
||||||
#include "mozilla/layers/CompositableClient.h"
|
#include "mozilla/layers/CompositableClient.h"
|
||||||
|
|
||||||
@ -14,16 +14,16 @@ namespace mozilla {
|
|||||||
namespace layers {
|
namespace layers {
|
||||||
|
|
||||||
void
|
void
|
||||||
ShadowLayersChild::Destroy()
|
LayerTransactionChild::Destroy()
|
||||||
{
|
{
|
||||||
NS_ABORT_IF_FALSE(0 == ManagedPLayerChild().Length(),
|
NS_ABORT_IF_FALSE(0 == ManagedPLayerChild().Length(),
|
||||||
"layers should have been cleaned up by now");
|
"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
|
// WARNING: |this| has gone to the great heap in the sky
|
||||||
}
|
}
|
||||||
|
|
||||||
PGrallocBufferChild*
|
PGrallocBufferChild*
|
||||||
ShadowLayersChild::AllocPGrallocBuffer(const gfxIntSize&,
|
LayerTransactionChild::AllocPGrallocBuffer(const gfxIntSize&,
|
||||||
const gfxContentType&,
|
const gfxContentType&,
|
||||||
MaybeMagicGrallocBufferHandle*)
|
MaybeMagicGrallocBufferHandle*)
|
||||||
{
|
{
|
||||||
@ -36,7 +36,7 @@ ShadowLayersChild::AllocPGrallocBuffer(const gfxIntSize&,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ShadowLayersChild::DeallocPGrallocBuffer(PGrallocBufferChild* actor)
|
LayerTransactionChild::DeallocPGrallocBuffer(PGrallocBufferChild* actor)
|
||||||
{
|
{
|
||||||
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
|
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
|
||||||
delete actor;
|
delete actor;
|
||||||
@ -48,7 +48,7 @@ ShadowLayersChild::DeallocPGrallocBuffer(PGrallocBufferChild* actor)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PLayerChild*
|
PLayerChild*
|
||||||
ShadowLayersChild::AllocPLayer()
|
LayerTransactionChild::AllocPLayer()
|
||||||
{
|
{
|
||||||
// we always use the "power-user" ctor
|
// we always use the "power-user" ctor
|
||||||
NS_RUNTIMEABORT("not reached");
|
NS_RUNTIMEABORT("not reached");
|
||||||
@ -56,30 +56,30 @@ ShadowLayersChild::AllocPLayer()
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ShadowLayersChild::DeallocPLayer(PLayerChild* actor)
|
LayerTransactionChild::DeallocPLayer(PLayerChild* actor)
|
||||||
{
|
{
|
||||||
delete actor;
|
delete actor;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
PCompositableChild*
|
PCompositableChild*
|
||||||
ShadowLayersChild::AllocPCompositable(const TextureInfo& aInfo)
|
LayerTransactionChild::AllocPCompositable(const TextureInfo& aInfo)
|
||||||
{
|
{
|
||||||
return new CompositableChild();
|
return new CompositableChild();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ShadowLayersChild::DeallocPCompositable(PCompositableChild* actor)
|
LayerTransactionChild::DeallocPCompositable(PCompositableChild* actor)
|
||||||
{
|
{
|
||||||
delete actor;
|
delete actor;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ShadowLayersChild::ActorDestroy(ActorDestroyReason why)
|
LayerTransactionChild::ActorDestroy(ActorDestroyReason why)
|
||||||
{
|
{
|
||||||
if (why == AbnormalShutdown) {
|
if (why == AbnormalShutdown) {
|
||||||
NS_RUNTIMEABORT("ActorDestroy by IPC channel failure at ShadowLayersChild");
|
NS_RUNTIMEABORT("ActorDestroy by IPC channel failure at LayerTransactionChild");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -5,19 +5,19 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#ifndef mozilla_layers_ShadowLayersChild_h
|
#ifndef MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H
|
||||||
#define mozilla_layers_ShadowLayersChild_h
|
#define MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H
|
||||||
|
|
||||||
#include "mozilla/layers/PLayersChild.h"
|
#include "mozilla/layers/PLayerTransactionChild.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace layers {
|
namespace layers {
|
||||||
|
|
||||||
class ShadowLayersChild : public PLayersChild
|
class LayerTransactionChild : public PLayerTransactionChild
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ShadowLayersChild() { }
|
LayerTransactionChild() { }
|
||||||
~ShadowLayersChild() { }
|
~LayerTransactionChild() { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean this up, finishing with Send__delete__().
|
* Clean this up, finishing with Send__delete__().
|
||||||
@ -46,4 +46,4 @@ protected:
|
|||||||
} // namespace layers
|
} // namespace layers
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
||||||
#endif // ifndef mozilla_layers_ShadowLayersChild_h
|
#endif // MOZILLA_LAYERS_LAYERTRANSACTIONCHILD_H
|
@ -15,7 +15,7 @@
|
|||||||
#include "mozilla/unused.h"
|
#include "mozilla/unused.h"
|
||||||
#include "RenderTrace.h"
|
#include "RenderTrace.h"
|
||||||
#include "ShadowLayerParent.h"
|
#include "ShadowLayerParent.h"
|
||||||
#include "ShadowLayersParent.h"
|
#include "LayerTransactionParent.h"
|
||||||
#include "ShadowLayers.h"
|
#include "ShadowLayers.h"
|
||||||
#include "ShadowLayerUtils.h"
|
#include "ShadowLayerUtils.h"
|
||||||
#include "TiledLayerBuffer.h"
|
#include "TiledLayerBuffer.h"
|
||||||
@ -124,25 +124,25 @@ ShadowChild(const OpRaiseToTopChild& op)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// ShadowLayersParent
|
// LayerTransactionParent
|
||||||
ShadowLayersParent::ShadowLayersParent(ShadowLayerManager* aManager,
|
LayerTransactionParent::LayerTransactionParent(ShadowLayerManager* aManager,
|
||||||
ShadowLayersManager* aLayersManager,
|
ShadowLayersManager* aLayersManager,
|
||||||
uint64_t aId)
|
uint64_t aId)
|
||||||
: mLayerManager(aManager)
|
: mLayerManager(aManager)
|
||||||
, mShadowLayersManager(aLayersManager)
|
, mShadowLayersManager(aLayersManager)
|
||||||
, mId(aId)
|
, mId(aId)
|
||||||
, mDestroyed(false)
|
, mDestroyed(false)
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(ShadowLayersParent);
|
MOZ_COUNT_CTOR(LayerTransactionParent);
|
||||||
}
|
}
|
||||||
|
|
||||||
ShadowLayersParent::~ShadowLayersParent()
|
LayerTransactionParent::~LayerTransactionParent()
|
||||||
{
|
{
|
||||||
MOZ_COUNT_DTOR(ShadowLayersParent);
|
MOZ_COUNT_DTOR(LayerTransactionParent);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ShadowLayersParent::Destroy()
|
LayerTransactionParent::Destroy()
|
||||||
{
|
{
|
||||||
mDestroyed = true;
|
mDestroyed = true;
|
||||||
for (size_t i = 0; i < ManagedPLayerParent().Length(); ++i) {
|
for (size_t i = 0; i < ManagedPLayerParent().Length(); ++i) {
|
||||||
@ -154,18 +154,18 @@ ShadowLayersParent::Destroy()
|
|||||||
|
|
||||||
/* virtual */
|
/* virtual */
|
||||||
bool
|
bool
|
||||||
ShadowLayersParent::RecvUpdateNoSwap(const InfallibleTArray<Edit>& cset,
|
LayerTransactionParent::RecvUpdateNoSwap(const InfallibleTArray<Edit>& cset,
|
||||||
const TargetConfig& targetConfig,
|
const TargetConfig& targetConfig,
|
||||||
const bool& isFirstPaint)
|
const bool& isFirstPaint)
|
||||||
{
|
{
|
||||||
return RecvUpdate(cset, targetConfig, isFirstPaint, nullptr);
|
return RecvUpdate(cset, targetConfig, isFirstPaint, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ShadowLayersParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
|
LayerTransactionParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
|
||||||
const TargetConfig& targetConfig,
|
const TargetConfig& targetConfig,
|
||||||
const bool& isFirstPaint,
|
const bool& isFirstPaint,
|
||||||
InfallibleTArray<EditReply>* reply)
|
InfallibleTArray<EditReply>* reply)
|
||||||
{
|
{
|
||||||
#ifdef COMPOSITOR_PERFORMANCE_WARNING
|
#ifdef COMPOSITOR_PERFORMANCE_WARNING
|
||||||
TimeStamp updateStart = TimeStamp::Now();
|
TimeStamp updateStart = TimeStamp::Now();
|
||||||
@ -421,7 +421,7 @@ ShadowLayersParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ShadowLayersParent::Attach(ShadowLayerParent* aLayerParent, CompositableParent* aCompositable)
|
LayerTransactionParent::Attach(ShadowLayerParent* aLayerParent, CompositableParent* aCompositable)
|
||||||
{
|
{
|
||||||
ShadowLayer* layer = aLayerParent->AsLayer()->AsShadowLayer();
|
ShadowLayer* layer = aLayerParent->AsLayer()->AsShadowLayer();
|
||||||
MOZ_ASSERT(layer);
|
MOZ_ASSERT(layer);
|
||||||
@ -437,7 +437,7 @@ ShadowLayersParent::Attach(ShadowLayerParent* aLayerParent, CompositableParent*
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ShadowLayersParent::RecvClearCachedResources()
|
LayerTransactionParent::RecvClearCachedResources()
|
||||||
{
|
{
|
||||||
if (mRoot) {
|
if (mRoot) {
|
||||||
// NB: |mRoot| here is the *child* context's root. In this parent
|
// NB: |mRoot| here is the *child* context's root. In this parent
|
||||||
@ -449,9 +449,9 @@ ShadowLayersParent::RecvClearCachedResources()
|
|||||||
}
|
}
|
||||||
|
|
||||||
PGrallocBufferParent*
|
PGrallocBufferParent*
|
||||||
ShadowLayersParent::AllocPGrallocBuffer(const gfxIntSize& aSize,
|
LayerTransactionParent::AllocPGrallocBuffer(const gfxIntSize& aSize,
|
||||||
const gfxContentType& aContent,
|
const gfxContentType& aContent,
|
||||||
MaybeMagicGrallocBufferHandle* aOutHandle)
|
MaybeMagicGrallocBufferHandle* aOutHandle)
|
||||||
{
|
{
|
||||||
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
|
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
|
||||||
return GrallocBufferActor::Create(aSize, aContent, aOutHandle);
|
return GrallocBufferActor::Create(aSize, aContent, aOutHandle);
|
||||||
@ -462,7 +462,7 @@ ShadowLayersParent::AllocPGrallocBuffer(const gfxIntSize& aSize,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ShadowLayersParent::DeallocPGrallocBuffer(PGrallocBufferParent* actor)
|
LayerTransactionParent::DeallocPGrallocBuffer(PGrallocBufferParent* actor)
|
||||||
{
|
{
|
||||||
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
|
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
|
||||||
delete actor;
|
delete actor;
|
||||||
@ -474,26 +474,26 @@ ShadowLayersParent::DeallocPGrallocBuffer(PGrallocBufferParent* actor)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PLayerParent*
|
PLayerParent*
|
||||||
ShadowLayersParent::AllocPLayer()
|
LayerTransactionParent::AllocPLayer()
|
||||||
{
|
{
|
||||||
return new ShadowLayerParent();
|
return new ShadowLayerParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ShadowLayersParent::DeallocPLayer(PLayerParent* actor)
|
LayerTransactionParent::DeallocPLayer(PLayerParent* actor)
|
||||||
{
|
{
|
||||||
delete actor;
|
delete actor;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
PCompositableParent*
|
PCompositableParent*
|
||||||
ShadowLayersParent::AllocPCompositable(const TextureInfo& aInfo)
|
LayerTransactionParent::AllocPCompositable(const TextureInfo& aInfo)
|
||||||
{
|
{
|
||||||
return new CompositableParent(this, aInfo);
|
return new CompositableParent(this, aInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ShadowLayersParent::DeallocPCompositable(PCompositableParent* actor)
|
LayerTransactionParent::DeallocPCompositable(PCompositableParent* actor)
|
||||||
{
|
{
|
||||||
delete actor;
|
delete actor;
|
||||||
return true;
|
return true;
|
@ -5,10 +5,10 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#ifndef mozilla_layers_ShadowLayersParent_h
|
#ifndef MOZILLA_LAYERS_LAYERTRANSACTIONPARENT_H
|
||||||
#define mozilla_layers_ShadowLayersParent_h
|
#define MOZILLA_LAYERS_LAYERTRANSACTIONPARENT_H
|
||||||
|
|
||||||
#include "mozilla/layers/PLayersParent.h"
|
#include "mozilla/layers/PLayerTransactionParent.h"
|
||||||
#include "ShadowLayers.h"
|
#include "ShadowLayers.h"
|
||||||
#include "ShadowLayersManager.h"
|
#include "ShadowLayersManager.h"
|
||||||
#include "CompositableTransactionParent.h"
|
#include "CompositableTransactionParent.h"
|
||||||
@ -26,18 +26,18 @@ class ShadowLayerManager;
|
|||||||
class ShadowLayerParent;
|
class ShadowLayerParent;
|
||||||
class CompositableParent;
|
class CompositableParent;
|
||||||
|
|
||||||
class ShadowLayersParent : public PLayersParent,
|
class LayerTransactionParent : public PLayerTransactionParent,
|
||||||
public CompositableParentManager
|
public CompositableParentManager
|
||||||
{
|
{
|
||||||
typedef mozilla::layout::RenderFrameParent RenderFrameParent;
|
typedef mozilla::layout::RenderFrameParent RenderFrameParent;
|
||||||
typedef InfallibleTArray<Edit> EditArray;
|
typedef InfallibleTArray<Edit> EditArray;
|
||||||
typedef InfallibleTArray<EditReply> EditReplyArray;
|
typedef InfallibleTArray<EditReply> EditReplyArray;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ShadowLayersParent(ShadowLayerManager* aManager,
|
LayerTransactionParent(ShadowLayerManager* aManager,
|
||||||
ShadowLayersManager* aLayersManager,
|
ShadowLayersManager* aLayersManager,
|
||||||
uint64_t aId);
|
uint64_t aId);
|
||||||
~ShadowLayersParent();
|
~LayerTransactionParent();
|
||||||
|
|
||||||
void Destroy();
|
void Destroy();
|
||||||
|
|
||||||
@ -50,18 +50,18 @@ public:
|
|||||||
virtual bool AllocShmem(size_t aSize,
|
virtual bool AllocShmem(size_t aSize,
|
||||||
ipc::SharedMemory::SharedMemoryType aType,
|
ipc::SharedMemory::SharedMemoryType aType,
|
||||||
ipc::Shmem* aShmem) {
|
ipc::Shmem* aShmem) {
|
||||||
return PLayersParent::AllocShmem(aSize, aType, aShmem);
|
return PLayerTransactionParent::AllocShmem(aSize, aType, aShmem);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool AllocUnsafeShmem(size_t aSize,
|
virtual bool AllocUnsafeShmem(size_t aSize,
|
||||||
ipc::SharedMemory::SharedMemoryType aType,
|
ipc::SharedMemory::SharedMemoryType aType,
|
||||||
ipc::Shmem* aShmem) {
|
ipc::Shmem* aShmem) {
|
||||||
return PLayersParent::AllocUnsafeShmem(aSize, aType, aShmem);
|
return PLayerTransactionParent::AllocUnsafeShmem(aSize, aType, aShmem);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void DeallocShmem(ipc::Shmem& aShmem) MOZ_OVERRIDE
|
virtual void DeallocShmem(ipc::Shmem& aShmem) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
PLayersParent::DeallocShmem(aShmem);
|
PLayerTransactionParent::DeallocShmem(aShmem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -121,4 +121,4 @@ private:
|
|||||||
} // namespace layers
|
} // namespace layers
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
||||||
#endif // ifndef mozilla_layers_ShadowLayersParent_h
|
#endif // MOZILLA_LAYERS_LAYERTRANSACTIONPARENT_H
|
@ -5,17 +5,17 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
include protocol PLayers;
|
include protocol PLayerTransaction;
|
||||||
include protocol PImageBridge;
|
include protocol PImageBridge;
|
||||||
include "mozilla/layers/CompositorTypes.h";
|
|
||||||
include protocol PCompositor;
|
include protocol PCompositor;
|
||||||
|
include "mozilla/layers/CompositorTypes.h";
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace layers {
|
namespace layers {
|
||||||
|
|
||||||
async protocol PCompositable
|
async protocol PCompositable
|
||||||
{
|
{
|
||||||
manager PImageBridge or PLayers;
|
manager PImageBridge or PLayerTransaction;
|
||||||
parent:
|
parent:
|
||||||
async __delete__();
|
async __delete__();
|
||||||
};
|
};
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
include LayersSurfaces;
|
include LayersSurfaces;
|
||||||
include protocol PGrallocBuffer;
|
include protocol PGrallocBuffer;
|
||||||
include protocol PLayers;
|
include protocol PLayerTransaction;
|
||||||
include "mozilla/layers/CompositorTypes.h";
|
include "mozilla/layers/CompositorTypes.h";
|
||||||
|
|
||||||
using mozilla::null_t;
|
using mozilla::null_t;
|
||||||
@ -21,14 +21,14 @@ namespace layers {
|
|||||||
/**
|
/**
|
||||||
* The PCompositor protocol is used to manage communication between
|
* The PCompositor protocol is used to manage communication between
|
||||||
* the main thread and the compositor thread context. It's primary
|
* 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
|
// This should really be 'sync', but we're using 'rpc' as a workaround
|
||||||
// for Bug 716631.
|
// for Bug 716631.
|
||||||
rpc protocol PCompositor
|
rpc protocol PCompositor
|
||||||
{
|
{
|
||||||
// A Compositor manages a single Layer Manager (PLayers)
|
// A Compositor manages a single Layer Manager (PLayerTransaction)
|
||||||
manages PLayers;
|
manages PLayerTransaction;
|
||||||
|
|
||||||
parent:
|
parent:
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ parent:
|
|||||||
sync MakeSnapshot(SurfaceDescriptor inSnapshot)
|
sync MakeSnapshot(SurfaceDescriptor inSnapshot)
|
||||||
returns (SurfaceDescriptor outSnapshot);
|
returns (SurfaceDescriptor outSnapshot);
|
||||||
|
|
||||||
sync PLayers(LayersBackend layersBackendHint, uint64_t id)
|
sync PLayerTransaction(LayersBackend layersBackendHint, uint64_t id)
|
||||||
returns (TextureFactoryIdentifier textureFactoryIdentifier);
|
returns (TextureFactoryIdentifier textureFactoryIdentifier);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
include protocol PCompositor;
|
include protocol PCompositor;
|
||||||
include protocol PImageBridge;
|
include protocol PImageBridge;
|
||||||
include protocol PLayers;
|
include protocol PLayerTransaction;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace layers {
|
namespace layers {
|
||||||
@ -20,7 +20,7 @@ namespace layers {
|
|||||||
*/
|
*/
|
||||||
async protocol PGrallocBuffer {
|
async protocol PGrallocBuffer {
|
||||||
// FIXME: Bug 783451: shouldn't be managed by PCompositor or PImageContainer
|
// 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. */
|
/** Gralloc buffers can be "owned" by either parent or child. */
|
||||||
both:
|
both:
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
include protocol PLayers;
|
include protocol PLayerTransaction;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace layers {
|
namespace layers {
|
||||||
@ -15,7 +15,7 @@ namespace layers {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
async protocol PLayer {
|
async protocol PLayer {
|
||||||
manager PLayers;
|
manager PLayerTransaction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OWNERSHIP MODEL
|
* OWNERSHIP MODEL
|
||||||
|
@ -32,7 +32,7 @@ using mozilla::layers::TextureInfo;
|
|||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace layers {
|
namespace layers {
|
||||||
|
|
||||||
sync protocol PLayers {
|
sync protocol PLayerTransaction {
|
||||||
manager PRenderFrame or PCompositor;
|
manager PRenderFrame or PCompositor;
|
||||||
manages PLayer;
|
manages PLayer;
|
||||||
manages PCompositable;
|
manages PCompositable;
|
@ -5,7 +5,7 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "ShadowLayersParent.h"
|
#include "LayerTransactionParent.h"
|
||||||
#include "ShadowLayerParent.h"
|
#include "ShadowLayerParent.h"
|
||||||
#include "ShadowLayers.h"
|
#include "ShadowLayers.h"
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ ShadowLayerParent::ActorDestroy(ActorDestroyReason why)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case FailedConstructor:
|
case FailedConstructor:
|
||||||
NS_RUNTIMEABORT("FailedConstructor isn't possible in PLayers");
|
NS_RUNTIMEABORT("FailedConstructor isn't possible in PLayerTransaction");
|
||||||
return; // unreached
|
return; // unreached
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ namespace layers {
|
|||||||
class ContainerLayer;
|
class ContainerLayer;
|
||||||
class Layer;
|
class Layer;
|
||||||
class LayerManager;
|
class LayerManager;
|
||||||
class ShadowLayersParent;
|
|
||||||
|
|
||||||
class ShadowLayerParent : public PLayerParent
|
class ShadowLayerParent : public PLayerParent
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include <d3d10_1.h>
|
#include <d3d10_1.h>
|
||||||
#include <dxgi.h>
|
#include <dxgi.h>
|
||||||
|
|
||||||
#include "mozilla/layers/PLayers.h"
|
#include "mozilla/layers/PLayerTransaction.h"
|
||||||
#include "ShadowLayers.h"
|
#include "ShadowLayers.h"
|
||||||
|
|
||||||
using namespace mozilla::gl;
|
using namespace mozilla::gl;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
#include "mozilla/layers/PGrallocBufferChild.h"
|
#include "mozilla/layers/PGrallocBufferChild.h"
|
||||||
#include "mozilla/layers/PGrallocBufferParent.h"
|
#include "mozilla/layers/PGrallocBufferParent.h"
|
||||||
#include "mozilla/layers/PLayersChild.h"
|
#include "mozilla/layers/PLayerTransactionChild.h"
|
||||||
#include "mozilla/layers/ShadowLayers.h"
|
#include "mozilla/layers/ShadowLayers.h"
|
||||||
#include "mozilla/unused.h"
|
#include "mozilla/unused.h"
|
||||||
#include "nsXULAppAPI.h"
|
#include "nsXULAppAPI.h"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* 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 "mozilla/layers/ShadowLayers.h"
|
||||||
|
|
||||||
#include "gfxPlatform.h"
|
#include "gfxPlatform.h"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* 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 "mozilla/layers/ShadowLayers.h"
|
||||||
|
|
||||||
#include "gfxPlatform.h"
|
#include "gfxPlatform.h"
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
#include "AutoOpenSurface.h"
|
#include "AutoOpenSurface.h"
|
||||||
#include "mozilla/ipc/SharedMemorySysV.h"
|
#include "mozilla/ipc/SharedMemorySysV.h"
|
||||||
#include "mozilla/layers/PLayerChild.h"
|
#include "mozilla/layers/PLayerChild.h"
|
||||||
#include "mozilla/layers/PLayersChild.h"
|
#include "mozilla/layers/PLayerTransactionChild.h"
|
||||||
#include "mozilla/layers/PLayersParent.h"
|
#include "mozilla/layers/PLayerTransactionParent.h"
|
||||||
#include "mozilla/layers/LayerTransaction.h"
|
#include "mozilla/layers/LayerTransaction.h"
|
||||||
#include "mozilla/layers/LayersSurfaces.h"
|
#include "mozilla/layers/LayersSurfaces.h"
|
||||||
#include "ShadowLayers.h"
|
#include "ShadowLayers.h"
|
||||||
|
@ -35,8 +35,8 @@ class Edit;
|
|||||||
class EditReply;
|
class EditReply;
|
||||||
class OptionalThebesBuffer;
|
class OptionalThebesBuffer;
|
||||||
class PLayerChild;
|
class PLayerChild;
|
||||||
class PLayersChild;
|
class PLayerTransactionChild;
|
||||||
class PLayersParent;
|
class PLayerTransactionParent;
|
||||||
class ShadowableLayer;
|
class ShadowableLayer;
|
||||||
class ShadowThebesLayer;
|
class ShadowThebesLayer;
|
||||||
class ShadowContainerLayer;
|
class ShadowContainerLayer;
|
||||||
@ -246,7 +246,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Set aMaskLayer as the mask on aLayer.
|
* Set aMaskLayer as the mask on aLayer.
|
||||||
* Note that only image layers are properly supported
|
* 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
|
* will need changing to update properties for other kinds
|
||||||
* of mask layer.
|
* of mask layer.
|
||||||
*/
|
*/
|
||||||
@ -268,7 +268,7 @@ public:
|
|||||||
* through ImageBridge, using an ID to connect the protocols on the
|
* through ImageBridge, using an ID to connect the protocols on the
|
||||||
* compositor side.
|
* 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
|
* 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.
|
* Set an actor through which layer updates will be pushed.
|
||||||
*/
|
*/
|
||||||
void SetShadowManager(PLayersChild* aShadowManager)
|
void SetShadowManager(PLayerTransactionChild* aShadowManager)
|
||||||
{
|
{
|
||||||
mShadowManager = aShadowManager;
|
mShadowManager = aShadowManager;
|
||||||
}
|
}
|
||||||
@ -311,7 +311,7 @@ public:
|
|||||||
* True if this is forwarding to a ShadowLayerManager.
|
* True if this is forwarding to a ShadowLayerManager.
|
||||||
*/
|
*/
|
||||||
bool HasShadowManager() const { return !!mShadowManager; }
|
bool HasShadowManager() const { return !!mShadowManager; }
|
||||||
PLayersChild* GetShadowManager() const { return mShadowManager; }
|
PLayerTransactionChild* GetShadowManager() const { return mShadowManager; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The following Alloc/Open/Destroy interfaces abstract over the
|
* The following Alloc/Open/Destroy interfaces abstract over the
|
||||||
@ -374,7 +374,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
ShadowLayerForwarder();
|
ShadowLayerForwarder();
|
||||||
|
|
||||||
PLayersChild* mShadowManager;
|
PLayerTransactionChild* mShadowManager;
|
||||||
|
|
||||||
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
|
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
|
||||||
virtual PGrallocBufferChild* AllocGrallocBuffer(const gfxIntSize& aSize,
|
virtual PGrallocBufferChild* AllocGrallocBuffer(const gfxIntSize& aSize,
|
||||||
|
@ -11,12 +11,12 @@ namespace mozilla {
|
|||||||
namespace layers {
|
namespace layers {
|
||||||
|
|
||||||
class TargetConfig;
|
class TargetConfig;
|
||||||
class ShadowLayersParent;
|
class LayerTransactionParent;
|
||||||
|
|
||||||
class ShadowLayersManager
|
class ShadowLayersManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void ShadowLayersUpdated(ShadowLayersParent* aLayerTree,
|
virtual void ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
|
||||||
const TargetConfig& aTargetConfig,
|
const TargetConfig& aTargetConfig,
|
||||||
bool isFirstPaint) = 0;
|
bool isFirstPaint) = 0;
|
||||||
};
|
};
|
||||||
|
@ -10,5 +10,5 @@ IPDLSRCS = \
|
|||||||
PGrallocBuffer.ipdl \
|
PGrallocBuffer.ipdl \
|
||||||
PImageBridge.ipdl \
|
PImageBridge.ipdl \
|
||||||
PLayer.ipdl \
|
PLayer.ipdl \
|
||||||
PLayers.ipdl \
|
PLayerTransaction.ipdl \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
@ -84,8 +84,8 @@ EXPORTS.mozilla.layers += [
|
|||||||
'ISurfaceAllocator.h',
|
'ISurfaceAllocator.h',
|
||||||
'LayersTypes.h',
|
'LayersTypes.h',
|
||||||
'ShadowLayers.h',
|
'ShadowLayers.h',
|
||||||
'ShadowLayersChild.h',
|
'LayerTransactionChild.h',
|
||||||
'ShadowLayersParent.h',
|
'LayerTransactionParent.h',
|
||||||
'ShadowLayersManager.h',
|
'ShadowLayersManager.h',
|
||||||
'RenderTrace.h',
|
'RenderTrace.h',
|
||||||
'SharedRGBImage.h',
|
'SharedRGBImage.h',
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "ipc/AutoOpenSurface.h"
|
#include "ipc/AutoOpenSurface.h"
|
||||||
#include "mozilla/layers/PLayers.h"
|
#include "mozilla/layers/PLayerTransaction.h"
|
||||||
#include "mozilla/layers/ShadowLayers.h"
|
#include "mozilla/layers/ShadowLayers.h"
|
||||||
|
|
||||||
#include "gfxSharedImageSurface.h"
|
#include "gfxSharedImageSurface.h"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#ifndef GFX_COLORLAYEROGL_H
|
#ifndef GFX_COLORLAYEROGL_H
|
||||||
#define GFX_COLORLAYEROGL_H
|
#define GFX_COLORLAYEROGL_H
|
||||||
|
|
||||||
#include "mozilla/layers/PLayers.h"
|
#include "mozilla/layers/PLayerTransaction.h"
|
||||||
#include "mozilla/layers/ShadowLayers.h"
|
#include "mozilla/layers/ShadowLayers.h"
|
||||||
|
|
||||||
#include "LayerManagerOGL.h"
|
#include "LayerManagerOGL.h"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#ifndef GFX_IMAGELAYEROGL_H
|
#ifndef GFX_IMAGELAYEROGL_H
|
||||||
#define GFX_IMAGELAYEROGL_H
|
#define GFX_IMAGELAYEROGL_H
|
||||||
|
|
||||||
#include "mozilla/layers/PLayers.h"
|
#include "mozilla/layers/PLayerTransaction.h"
|
||||||
|
|
||||||
#include "LayerManagerOGL.h"
|
#include "LayerManagerOGL.h"
|
||||||
#include "ImageLayers.h"
|
#include "ImageLayers.h"
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
|
|
||||||
#include "LayerManagerOGL.h"
|
#include "LayerManagerOGL.h"
|
||||||
|
|
||||||
#include "mozilla/layers/PLayers.h"
|
#include "mozilla/layers/PLayerTransaction.h"
|
||||||
#include <algorithm>
|
#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 "mozilla/Util.h"
|
||||||
|
|
||||||
#include "Composer2D.h"
|
#include "Composer2D.h"
|
||||||
|
@ -4,10 +4,10 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "ipc/AutoOpenSurface.h"
|
#include "ipc/AutoOpenSurface.h"
|
||||||
#include "mozilla/layers/PLayers.h"
|
#include "mozilla/layers/PLayerTransaction.h"
|
||||||
#include "TiledLayerBuffer.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/Util.h"
|
||||||
|
|
||||||
#include "ThebesLayerBuffer.h"
|
#include "ThebesLayerBuffer.h"
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "mozilla/dom/PBrowserChild.h"
|
#include "mozilla/dom/PBrowserChild.h"
|
||||||
#include "mozilla/dom/TabChild.h"
|
#include "mozilla/dom/TabChild.h"
|
||||||
|
|
||||||
#include "mozilla/layers/PLayers.h"
|
#include "mozilla/layers/PLayerTransaction.h"
|
||||||
|
|
||||||
#include "nsDisplayList.h"
|
#include "nsDisplayList.h"
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
include protocol PBrowser;
|
include protocol PBrowser;
|
||||||
include protocol PLayers;
|
include protocol PLayerTransaction;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace layout {
|
namespace layout {
|
||||||
@ -23,7 +23,7 @@ namespace layout {
|
|||||||
sync protocol PRenderFrame
|
sync protocol PRenderFrame
|
||||||
{
|
{
|
||||||
manager PBrowser;
|
manager PBrowser;
|
||||||
manages PLayers;
|
manages PLayerTransaction;
|
||||||
|
|
||||||
parent:
|
parent:
|
||||||
/**
|
/**
|
||||||
@ -37,7 +37,7 @@ parent:
|
|||||||
* |id| is set to 0 in the "direct" case, and to a whole number
|
* |id| is set to 0 in the "direct" case, and to a whole number
|
||||||
* in the "indirect" case.
|
* in the "indirect" case.
|
||||||
*/
|
*/
|
||||||
async PLayers();
|
async PLayerTransaction();
|
||||||
|
|
||||||
async NotifyCompositorTransaction();
|
async NotifyCompositorTransaction();
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ parent:
|
|||||||
async __delete__();
|
async __delete__();
|
||||||
|
|
||||||
state EMPTY_OR_DIRECT_COMPOSITOR:
|
state EMPTY_OR_DIRECT_COMPOSITOR:
|
||||||
recv PLayers goto HAVE_CONTENT;
|
recv PLayerTransaction goto HAVE_CONTENT;
|
||||||
recv NotifyCompositorTransaction goto EMPTY_OR_DIRECT_COMPOSITOR;
|
recv NotifyCompositorTransaction goto EMPTY_OR_DIRECT_COMPOSITOR;
|
||||||
recv __delete__;
|
recv __delete__;
|
||||||
|
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "RenderFrameChild.h"
|
#include "RenderFrameChild.h"
|
||||||
#include "mozilla/layers/ShadowLayersChild.h"
|
#include "mozilla/layers/LayerTransactionChild.h"
|
||||||
|
|
||||||
using mozilla::layers::PLayersChild;
|
using mozilla::layers::PLayerTransactionChild;
|
||||||
using mozilla::layers::ShadowLayersChild;
|
using mozilla::layers::LayerTransactionChild;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace layout {
|
namespace layout {
|
||||||
@ -17,13 +17,13 @@ namespace layout {
|
|||||||
void
|
void
|
||||||
RenderFrameChild::Destroy()
|
RenderFrameChild::Destroy()
|
||||||
{
|
{
|
||||||
size_t numChildren = ManagedPLayersChild().Length();
|
size_t numChildren = ManagedPLayerTransactionChild().Length();
|
||||||
NS_ABORT_IF_FALSE(0 == numChildren || 1 == numChildren,
|
NS_ABORT_IF_FALSE(0 == numChildren || 1 == numChildren,
|
||||||
"render frame must only have 0 or 1 layer forwarder");
|
"render frame must only have 0 or 1 layer forwarder");
|
||||||
|
|
||||||
if (numChildren) {
|
if (numChildren) {
|
||||||
ShadowLayersChild* layers =
|
LayerTransactionChild* layers =
|
||||||
static_cast<ShadowLayersChild*>(ManagedPLayersChild()[0]);
|
static_cast<LayerTransactionChild*>(ManagedPLayerTransactionChild()[0]);
|
||||||
layers->Destroy();
|
layers->Destroy();
|
||||||
// |layers| was just deleted, take care
|
// |layers| was just deleted, take care
|
||||||
}
|
}
|
||||||
@ -44,14 +44,14 @@ RenderFrameChild::DetectScrollableSubframe()
|
|||||||
SendDetectScrollableSubframe();
|
SendDetectScrollableSubframe();
|
||||||
}
|
}
|
||||||
|
|
||||||
PLayersChild*
|
PLayerTransactionChild*
|
||||||
RenderFrameChild::AllocPLayers()
|
RenderFrameChild::AllocPLayerTransaction()
|
||||||
{
|
{
|
||||||
return new ShadowLayersChild();
|
return new LayerTransactionChild();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
RenderFrameChild::DeallocPLayers(PLayersChild* aLayers)
|
RenderFrameChild::DeallocPLayerTransaction(PLayerTransactionChild* aLayers)
|
||||||
{
|
{
|
||||||
delete aLayers;
|
delete aLayers;
|
||||||
return true;
|
return true;
|
||||||
|
@ -25,8 +25,8 @@ public:
|
|||||||
void Destroy();
|
void Destroy();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual PLayersChild* AllocPLayers() MOZ_OVERRIDE;
|
virtual PLayerTransactionChild* AllocPLayerTransaction() MOZ_OVERRIDE;
|
||||||
virtual bool DeallocPLayers(PLayersChild* aLayers) MOZ_OVERRIDE;
|
virtual bool DeallocPLayerTransaction(PLayerTransactionChild* aLayers) MOZ_OVERRIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace layout
|
} // namespace layout
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include "mozilla/dom/TabParent.h"
|
#include "mozilla/dom/TabParent.h"
|
||||||
#include "mozilla/layers/AsyncPanZoomController.h"
|
#include "mozilla/layers/AsyncPanZoomController.h"
|
||||||
#include "mozilla/layers/CompositorParent.h"
|
#include "mozilla/layers/CompositorParent.h"
|
||||||
#include "mozilla/layers/ShadowLayersParent.h"
|
#include "mozilla/layers/LayerTransactionParent.h"
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
#include "nsFrameLoader.h"
|
#include "nsFrameLoader.h"
|
||||||
#include "nsIObserver.h"
|
#include "nsIObserver.h"
|
||||||
@ -629,13 +629,13 @@ RenderFrameParent::~RenderFrameParent()
|
|||||||
void
|
void
|
||||||
RenderFrameParent::Destroy()
|
RenderFrameParent::Destroy()
|
||||||
{
|
{
|
||||||
size_t numChildren = ManagedPLayersParent().Length();
|
size_t numChildren = ManagedPLayerTransactionParent().Length();
|
||||||
NS_ABORT_IF_FALSE(0 == numChildren || 1 == numChildren,
|
NS_ABORT_IF_FALSE(0 == numChildren || 1 == numChildren,
|
||||||
"render frame must only have 0 or 1 layer manager");
|
"render frame must only have 0 or 1 layer manager");
|
||||||
|
|
||||||
if (numChildren) {
|
if (numChildren) {
|
||||||
ShadowLayersParent* layers =
|
LayerTransactionParent* layers =
|
||||||
static_cast<ShadowLayersParent*>(ManagedPLayersParent()[0]);
|
static_cast<LayerTransactionParent*>(ManagedPLayerTransactionParent()[0]);
|
||||||
layers->Destroy();
|
layers->Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -657,7 +657,7 @@ RenderFrameParent::ContentViewScaleChanged(nsContentView* aView)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RenderFrameParent::ShadowLayersUpdated(ShadowLayersParent* aLayerTree,
|
RenderFrameParent::ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
|
||||||
const TargetConfig& aTargetConfig,
|
const TargetConfig& aTargetConfig,
|
||||||
bool isFirstPaint)
|
bool isFirstPaint)
|
||||||
{
|
{
|
||||||
@ -846,18 +846,18 @@ RenderFrameParent::RecvDetectScrollableSubframe()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
PLayersParent*
|
PLayerTransactionParent*
|
||||||
RenderFrameParent::AllocPLayers()
|
RenderFrameParent::AllocPLayerTransaction()
|
||||||
{
|
{
|
||||||
if (!mFrameLoader || mFrameLoaderDestroyed) {
|
if (!mFrameLoader || mFrameLoaderDestroyed) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
nsRefPtr<LayerManager> lm = GetFrom(mFrameLoader);
|
nsRefPtr<LayerManager> lm = GetFrom(mFrameLoader);
|
||||||
return new ShadowLayersParent(lm->AsShadowManager(), this, 0);
|
return new LayerTransactionParent(lm->AsShadowManager(), this, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
RenderFrameParent::DeallocPLayers(PLayersParent* aLayers)
|
RenderFrameParent::DeallocPLayerTransaction(PLayerTransactionParent* aLayers)
|
||||||
{
|
{
|
||||||
delete aLayers;
|
delete aLayers;
|
||||||
return true;
|
return true;
|
||||||
@ -915,14 +915,14 @@ RenderFrameParent::TriggerRepaint()
|
|||||||
docFrame->SchedulePaint();
|
docFrame->SchedulePaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
ShadowLayersParent*
|
LayerTransactionParent*
|
||||||
RenderFrameParent::GetShadowLayers() const
|
RenderFrameParent::GetShadowLayers() const
|
||||||
{
|
{
|
||||||
const InfallibleTArray<PLayersParent*>& shadowParents = ManagedPLayersParent();
|
const InfallibleTArray<PLayerTransactionParent*>& shadowParents = ManagedPLayerTransactionParent();
|
||||||
NS_ABORT_IF_FALSE(shadowParents.Length() <= 1,
|
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) ?
|
return (shadowParents.Length() == 1) ?
|
||||||
static_cast<ShadowLayersParent*>(shadowParents[0]) : nullptr;
|
static_cast<LayerTransactionParent*>(shadowParents[0]) : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t
|
uint64_t
|
||||||
@ -934,7 +934,7 @@ RenderFrameParent::GetLayerTreeId() const
|
|||||||
ContainerLayer*
|
ContainerLayer*
|
||||||
RenderFrameParent::GetRootLayer() const
|
RenderFrameParent::GetRootLayer() const
|
||||||
{
|
{
|
||||||
ShadowLayersParent* shadowLayers = GetShadowLayers();
|
LayerTransactionParent* shadowLayers = GetShadowLayers();
|
||||||
return shadowLayers ? shadowLayers->GetRoot() : nullptr;
|
return shadowLayers ? shadowLayers->GetRoot() : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ namespace layers {
|
|||||||
class AsyncPanZoomController;
|
class AsyncPanZoomController;
|
||||||
class GestureEventListener;
|
class GestureEventListener;
|
||||||
class TargetConfig;
|
class TargetConfig;
|
||||||
class ShadowLayersParent;
|
class LayerTransactionParent;
|
||||||
struct TextureFactoryIdentifier;
|
struct TextureFactoryIdentifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ class RenderFrameParent : public PRenderFrameParent,
|
|||||||
typedef mozilla::layers::Layer Layer;
|
typedef mozilla::layers::Layer Layer;
|
||||||
typedef mozilla::layers::LayerManager LayerManager;
|
typedef mozilla::layers::LayerManager LayerManager;
|
||||||
typedef mozilla::layers::TargetConfig TargetConfig;
|
typedef mozilla::layers::TargetConfig TargetConfig;
|
||||||
typedef mozilla::layers::ShadowLayersParent ShadowLayersParent;
|
typedef mozilla::layers::LayerTransactionParent LayerTransactionParent;
|
||||||
typedef mozilla::FrameLayerBuilder::ContainerParameters ContainerParameters;
|
typedef mozilla::FrameLayerBuilder::ContainerParameters ContainerParameters;
|
||||||
typedef mozilla::layers::TextureFactoryIdentifier TextureFactoryIdentifier;
|
typedef mozilla::layers::TextureFactoryIdentifier TextureFactoryIdentifier;
|
||||||
typedef FrameMetrics::ViewID ViewID;
|
typedef FrameMetrics::ViewID ViewID;
|
||||||
@ -73,7 +73,7 @@ public:
|
|||||||
|
|
||||||
void ContentViewScaleChanged(nsContentView* aView);
|
void ContentViewScaleChanged(nsContentView* aView);
|
||||||
|
|
||||||
virtual void ShadowLayersUpdated(ShadowLayersParent* aLayerTree,
|
virtual void ShadowLayersUpdated(LayerTransactionParent* aLayerTree,
|
||||||
const TargetConfig& aTargetConfig,
|
const TargetConfig& aTargetConfig,
|
||||||
bool isFirstPaint) MOZ_OVERRIDE;
|
bool isFirstPaint) MOZ_OVERRIDE;
|
||||||
|
|
||||||
@ -112,15 +112,15 @@ protected:
|
|||||||
virtual bool RecvCancelDefaultPanZoom() MOZ_OVERRIDE;
|
virtual bool RecvCancelDefaultPanZoom() MOZ_OVERRIDE;
|
||||||
virtual bool RecvDetectScrollableSubframe() MOZ_OVERRIDE;
|
virtual bool RecvDetectScrollableSubframe() MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual PLayersParent* AllocPLayers() MOZ_OVERRIDE;
|
virtual PLayerTransactionParent* AllocPLayerTransaction() MOZ_OVERRIDE;
|
||||||
virtual bool DeallocPLayers(PLayersParent* aLayers) MOZ_OVERRIDE;
|
virtual bool DeallocPLayerTransaction(PLayerTransactionParent* aLayers) MOZ_OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void BuildViewMap();
|
void BuildViewMap();
|
||||||
void TriggerRepaint();
|
void TriggerRepaint();
|
||||||
void DispatchEventForPanZoomController(const InputEvent& aEvent);
|
void DispatchEventForPanZoomController(const InputEvent& aEvent);
|
||||||
|
|
||||||
ShadowLayersParent* GetShadowLayers() const;
|
LayerTransactionParent* GetShadowLayers() const;
|
||||||
uint64_t GetLayerTreeId() const;
|
uint64_t GetLayerTreeId() const;
|
||||||
ContainerLayer* GetRootLayer() const;
|
ContainerLayer* GetRootLayer() const;
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ static gfxIntSize gAndroidScreenBounds;
|
|||||||
#include "mozilla/layers/AsyncPanZoomController.h"
|
#include "mozilla/layers/AsyncPanZoomController.h"
|
||||||
#include "mozilla/layers/CompositorChild.h"
|
#include "mozilla/layers/CompositorChild.h"
|
||||||
#include "mozilla/layers/CompositorParent.h"
|
#include "mozilla/layers/CompositorParent.h"
|
||||||
#include "mozilla/layers/ShadowLayersParent.h"
|
#include "mozilla/layers/LayerTransactionParent.h"
|
||||||
#include "mozilla/Mutex.h"
|
#include "mozilla/Mutex.h"
|
||||||
#include "nsThreadUtils.h"
|
#include "nsThreadUtils.h"
|
||||||
|
|
||||||
@ -683,7 +683,7 @@ nsWindow::SetWindowClass(const nsAString& xulWinType)
|
|||||||
}
|
}
|
||||||
|
|
||||||
mozilla::layers::LayerManager*
|
mozilla::layers::LayerManager*
|
||||||
nsWindow::GetLayerManager(PLayersChild*, LayersBackend, LayerManagerPersistence,
|
nsWindow::GetLayerManager(PLayerTransactionChild*, LayersBackend, LayerManagerPersistence,
|
||||||
bool* aAllowRetaining)
|
bool* aAllowRetaining)
|
||||||
{
|
{
|
||||||
if (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,
|
const mozilla::layers::TargetConfig& aTargetConfig,
|
||||||
bool isFirstPaint) MOZ_OVERRIDE
|
bool isFirstPaint) MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
|
@ -134,7 +134,7 @@ public:
|
|||||||
uint32_t aNewEnd) MOZ_OVERRIDE;
|
uint32_t aNewEnd) MOZ_OVERRIDE;
|
||||||
virtual nsIMEUpdatePreference GetIMEUpdatePreference();
|
virtual nsIMEUpdatePreference GetIMEUpdatePreference();
|
||||||
|
|
||||||
LayerManager* GetLayerManager (PLayersChild* aShadowManager = nullptr,
|
LayerManager* GetLayerManager (PLayerTransactionChild* aShadowManager = nullptr,
|
||||||
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
|
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
|
||||||
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
||||||
bool* aAllowRetaining = nullptr);
|
bool* aAllowRetaining = nullptr);
|
||||||
|
@ -255,7 +255,7 @@ public:
|
|||||||
|
|
||||||
NS_IMETHOD Invalidate(const nsIntRect &aRect);
|
NS_IMETHOD Invalidate(const nsIntRect &aRect);
|
||||||
virtual nsresult ConfigureChildren(const nsTArray<Configuration>& aConfigurations);
|
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,
|
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
|
||||||
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
||||||
bool* aAllowRetaining = nullptr);
|
bool* aAllowRetaining = nullptr);
|
||||||
|
@ -993,7 +993,7 @@ nsCocoaWindow::ConfigureChildren(const nsTArray<Configuration>& aConfigurations)
|
|||||||
}
|
}
|
||||||
|
|
||||||
LayerManager*
|
LayerManager*
|
||||||
nsCocoaWindow::GetLayerManager(PLayersChild* aShadowManager,
|
nsCocoaWindow::GetLayerManager(PLayerTransactionChild* aShadowManager,
|
||||||
LayersBackend aBackendHint,
|
LayersBackend aBackendHint,
|
||||||
LayerManagerPersistence aPersistence,
|
LayerManagerPersistence aPersistence,
|
||||||
bool* aAllowRetaining)
|
bool* aAllowRetaining)
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include "Framebuffer.h"
|
#include "Framebuffer.h"
|
||||||
#include "HwcComposer2D.h"
|
#include "HwcComposer2D.h"
|
||||||
#include "LayerManagerOGL.h"
|
#include "LayerManagerOGL.h"
|
||||||
#include "mozilla/layers/PLayers.h"
|
#include "mozilla/layers/PLayerTransaction.h"
|
||||||
#include "mozilla/layers/ShadowLayerUtilsGralloc.h"
|
#include "mozilla/layers/ShadowLayerUtilsGralloc.h"
|
||||||
#include "mozilla/StaticPtr.h"
|
#include "mozilla/StaticPtr.h"
|
||||||
#include "cutils/properties.h"
|
#include "cutils/properties.h"
|
||||||
|
@ -539,7 +539,7 @@ nsWindow::GetDPI()
|
|||||||
}
|
}
|
||||||
|
|
||||||
LayerManager *
|
LayerManager *
|
||||||
nsWindow::GetLayerManager(PLayersChild* aShadowManager,
|
nsWindow::GetLayerManager(PLayerTransactionChild* aShadowManager,
|
||||||
LayersBackend aBackendHint,
|
LayersBackend aBackendHint,
|
||||||
LayerManagerPersistence aPersistence,
|
LayerManagerPersistence aPersistence,
|
||||||
bool* aAllowRetaining)
|
bool* aAllowRetaining)
|
||||||
|
@ -94,7 +94,7 @@ public:
|
|||||||
|
|
||||||
virtual float GetDPI();
|
virtual float GetDPI();
|
||||||
virtual mozilla::layers::LayerManager*
|
virtual mozilla::layers::LayerManager*
|
||||||
GetLayerManager(PLayersChild* aShadowManager = nullptr,
|
GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
|
||||||
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
|
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
|
||||||
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
||||||
bool* aAllowRetaining = nullptr);
|
bool* aAllowRetaining = nullptr);
|
||||||
|
@ -6164,7 +6164,7 @@ nsWindow::BeginResizeDrag(nsGUIEvent* aEvent, int32_t aHorizontal, int32_t aVert
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsIWidget::LayerManager*
|
nsIWidget::LayerManager*
|
||||||
nsWindow::GetLayerManager(PLayersChild* aShadowManager,
|
nsWindow::GetLayerManager(PLayerTransactionChild* aShadowManager,
|
||||||
LayersBackend aBackendHint,
|
LayersBackend aBackendHint,
|
||||||
LayerManagerPersistence aPersistence,
|
LayerManagerPersistence aPersistence,
|
||||||
bool* aAllowRetaining)
|
bool* aAllowRetaining)
|
||||||
|
@ -430,7 +430,7 @@ private:
|
|||||||
void DispatchMissedButtonReleases(GdkEventCrossing *aGdkEvent);
|
void DispatchMissedButtonReleases(GdkEventCrossing *aGdkEvent);
|
||||||
|
|
||||||
// nsBaseWidget
|
// nsBaseWidget
|
||||||
virtual LayerManager* GetLayerManager(PLayersChild* aShadowManager = nullptr,
|
virtual LayerManager* GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
|
||||||
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
|
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
|
||||||
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
||||||
bool* aAllowRetaining = nullptr) MOZ_OVERRIDE;
|
bool* aAllowRetaining = nullptr) MOZ_OVERRIDE;
|
||||||
|
@ -45,7 +45,7 @@ namespace layers {
|
|||||||
class Composer2D;
|
class Composer2D;
|
||||||
class CompositorChild;
|
class CompositorChild;
|
||||||
class LayerManager;
|
class LayerManager;
|
||||||
class PLayersChild;
|
class PLayerTransactionChild;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -419,7 +419,7 @@ class nsIWidget : public nsISupports {
|
|||||||
typedef mozilla::layers::CompositorChild CompositorChild;
|
typedef mozilla::layers::CompositorChild CompositorChild;
|
||||||
typedef mozilla::layers::LayerManager LayerManager;
|
typedef mozilla::layers::LayerManager LayerManager;
|
||||||
typedef mozilla::layers::LayersBackend LayersBackend;
|
typedef mozilla::layers::LayersBackend LayersBackend;
|
||||||
typedef mozilla::layers::PLayersChild PLayersChild;
|
typedef mozilla::layers::PLayerTransactionChild PLayerTransactionChild;
|
||||||
typedef mozilla::widget::NotificationToIME NotificationToIME;
|
typedef mozilla::widget::NotificationToIME NotificationToIME;
|
||||||
typedef mozilla::widget::IMEState IMEState;
|
typedef mozilla::widget::IMEState IMEState;
|
||||||
typedef mozilla::widget::InputContext InputContext;
|
typedef mozilla::widget::InputContext InputContext;
|
||||||
@ -1148,7 +1148,7 @@ class nsIWidget : public nsISupports {
|
|||||||
* type |aBackendHint| instead of what would normally be created.
|
* type |aBackendHint| instead of what would normally be created.
|
||||||
* LAYERS_NONE means "no hint".
|
* LAYERS_NONE means "no hint".
|
||||||
*/
|
*/
|
||||||
virtual LayerManager* GetLayerManager(PLayersChild* aShadowManager,
|
virtual LayerManager* GetLayerManager(PLayerTransactionChild* aShadowManager,
|
||||||
LayersBackend aBackendHint,
|
LayersBackend aBackendHint,
|
||||||
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
||||||
bool* aAllowRetaining = nullptr) = 0;
|
bool* aAllowRetaining = nullptr) = 0;
|
||||||
|
@ -3210,7 +3210,7 @@ nsWindow::ShouldUseOffMainThreadCompositing()
|
|||||||
}
|
}
|
||||||
|
|
||||||
LayerManager*
|
LayerManager*
|
||||||
nsWindow::GetLayerManager(PLayersChild* aShadowManager,
|
nsWindow::GetLayerManager(PLayerTransactionChild* aShadowManager,
|
||||||
LayersBackend aBackendHint,
|
LayersBackend aBackendHint,
|
||||||
LayerManagerPersistence aPersistence,
|
LayerManagerPersistence aPersistence,
|
||||||
bool* aAllowRetaining)
|
bool* aAllowRetaining)
|
||||||
|
@ -136,7 +136,7 @@ public:
|
|||||||
bool aDoCapture);
|
bool aDoCapture);
|
||||||
NS_IMETHOD GetAttention(int32_t aCycleCount);
|
NS_IMETHOD GetAttention(int32_t aCycleCount);
|
||||||
virtual bool HasPendingInputEvent();
|
virtual bool HasPendingInputEvent();
|
||||||
virtual LayerManager* GetLayerManager(PLayersChild* aShadowManager = nullptr,
|
virtual LayerManager* GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
|
||||||
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
|
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
|
||||||
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
||||||
bool* aAllowRetaining = nullptr);
|
bool* aAllowRetaining = nullptr);
|
||||||
|
@ -793,7 +793,7 @@ MetroWidget::ShouldUseBasicManager()
|
|||||||
}
|
}
|
||||||
|
|
||||||
LayerManager*
|
LayerManager*
|
||||||
MetroWidget::GetLayerManager(PLayersChild* aShadowManager,
|
MetroWidget::GetLayerManager(PLayerTransactionChild* aShadowManager,
|
||||||
LayersBackend aBackendHint,
|
LayersBackend aBackendHint,
|
||||||
LayerManagerPersistence aPersistence,
|
LayerManagerPersistence aPersistence,
|
||||||
bool* aAllowRetaining)
|
bool* aAllowRetaining)
|
||||||
|
@ -119,7 +119,7 @@ public:
|
|||||||
virtual bool ShouldUseOffMainThreadCompositing();
|
virtual bool ShouldUseOffMainThreadCompositing();
|
||||||
bool ShouldUseMainThreadD3D10Manager();
|
bool ShouldUseMainThreadD3D10Manager();
|
||||||
bool ShouldUseBasicManager();
|
bool ShouldUseBasicManager();
|
||||||
virtual LayerManager* GetLayerManager(PLayersChild* aShadowManager = nullptr,
|
virtual LayerManager* GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
|
||||||
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
|
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
|
||||||
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
||||||
bool* aAllowRetaining = nullptr);
|
bool* aAllowRetaining = nullptr);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "mozilla/dom/TabChild.h"
|
#include "mozilla/dom/TabChild.h"
|
||||||
#include "mozilla/Hal.h"
|
#include "mozilla/Hal.h"
|
||||||
#include "mozilla/layers/CompositorChild.h"
|
#include "mozilla/layers/CompositorChild.h"
|
||||||
#include "mozilla/layers/PLayersChild.h"
|
#include "mozilla/layers/PLayerTransactionChild.h"
|
||||||
#include "PuppetWidget.h"
|
#include "PuppetWidget.h"
|
||||||
#include "nsIWidgetListener.h"
|
#include "nsIWidgetListener.h"
|
||||||
|
|
||||||
@ -304,7 +304,7 @@ PuppetWidget::DispatchEvent(nsGUIEvent* event, nsEventStatus& aStatus)
|
|||||||
}
|
}
|
||||||
|
|
||||||
LayerManager*
|
LayerManager*
|
||||||
PuppetWidget::GetLayerManager(PLayersChild* aShadowManager,
|
PuppetWidget::GetLayerManager(PLayerTransactionChild* aShadowManager,
|
||||||
LayersBackend aBackendHint,
|
LayersBackend aBackendHint,
|
||||||
LayerManagerPersistence aPersistence,
|
LayerManagerPersistence aPersistence,
|
||||||
bool* aAllowRetaining)
|
bool* aAllowRetaining)
|
||||||
|
@ -143,7 +143,7 @@ public:
|
|||||||
{ return eTransparencyTransparent; }
|
{ return eTransparencyTransparent; }
|
||||||
|
|
||||||
virtual LayerManager*
|
virtual LayerManager*
|
||||||
GetLayerManager(PLayersChild* aShadowManager = nullptr,
|
GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
|
||||||
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
|
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
|
||||||
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
||||||
bool* aAllowRetaining = nullptr);
|
bool* aAllowRetaining = nullptr);
|
||||||
|
@ -896,9 +896,9 @@ void nsBaseWidget::CreateCompositor(int aWidth, int aHeight)
|
|||||||
mCompositorChild->Open(parentChannel, childMessageLoop, childSide);
|
mCompositorChild->Open(parentChannel, childMessageLoop, childSide);
|
||||||
|
|
||||||
TextureFactoryIdentifier textureFactoryIdentifier;
|
TextureFactoryIdentifier textureFactoryIdentifier;
|
||||||
PLayersChild* shadowManager;
|
PLayerTransactionChild* shadowManager;
|
||||||
mozilla::layers::LayersBackend backendHint = mozilla::layers::LAYERS_OPENGL;
|
mozilla::layers::LayersBackend backendHint = mozilla::layers::LAYERS_OPENGL;
|
||||||
shadowManager = mCompositorChild->SendPLayersConstructor(
|
shadowManager = mCompositorChild->SendPLayerTransactionConstructor(
|
||||||
backendHint, 0, &textureFactoryIdentifier);
|
backendHint, 0, &textureFactoryIdentifier);
|
||||||
|
|
||||||
if (shadowManager) {
|
if (shadowManager) {
|
||||||
@ -927,7 +927,7 @@ bool nsBaseWidget::ShouldUseOffMainThreadCompositing()
|
|||||||
return CompositorParent::CompositorLoop() && !isSmallPopup;
|
return CompositorParent::CompositorLoop() && !isSmallPopup;
|
||||||
}
|
}
|
||||||
|
|
||||||
LayerManager* nsBaseWidget::GetLayerManager(PLayersChild* aShadowManager,
|
LayerManager* nsBaseWidget::GetLayerManager(PLayerTransactionChild* aShadowManager,
|
||||||
LayersBackend aBackendHint,
|
LayersBackend aBackendHint,
|
||||||
LayerManagerPersistence aPersistence,
|
LayerManagerPersistence aPersistence,
|
||||||
bool* aAllowRetaining)
|
bool* aAllowRetaining)
|
||||||
|
@ -105,7 +105,7 @@ public:
|
|||||||
NS_IMETHOD HideWindowChrome(bool aShouldHide);
|
NS_IMETHOD HideWindowChrome(bool aShouldHide);
|
||||||
NS_IMETHOD MakeFullScreen(bool aFullScreen);
|
NS_IMETHOD MakeFullScreen(bool aFullScreen);
|
||||||
virtual nsDeviceContext* GetDeviceContext();
|
virtual nsDeviceContext* GetDeviceContext();
|
||||||
virtual LayerManager* GetLayerManager(PLayersChild* aShadowManager = nullptr,
|
virtual LayerManager* GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
|
||||||
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
|
LayersBackend aBackendHint = mozilla::layers::LAYERS_NONE,
|
||||||
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT,
|
||||||
bool* aAllowRetaining = nullptr);
|
bool* aAllowRetaining = nullptr);
|
||||||
|
Loading…
Reference in New Issue
Block a user