зеркало из https://github.com/mozilla/gecko-dev.git
Bug 865033 part 1. Remove GetLayerManager from CompositorParent. r=mattwoodrow
This commit is contained in:
Родитель
d673d7e6ed
Коммит
9fbe01b722
|
@ -1,24 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set sw=2 ts=2 et tw=80 : */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "CompositorParent.h"
|
||||
#include "CompositorCocoaWidgetHelper.h"
|
||||
#include "nsDebug.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
namespace compositor {
|
||||
|
||||
LayerManagerComposite*
|
||||
GetLayerManager(CompositorParent* aParent)
|
||||
{
|
||||
return aParent->GetLayerManager();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* vim: set sw=4 ts=8 et tw=80 : */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef mozilla_layers_CompositorCocoaWidgetHelper_h
|
||||
#define mozilla_layers_CompositorCocoaWidgetHelper_h
|
||||
|
||||
// Note we can't include IPDL-generated headers here, since this file is being
|
||||
// used as a workaround for Bug 719036.
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
||||
class CompositorParent;
|
||||
class LayerManagerComposite;
|
||||
|
||||
namespace compositor {
|
||||
|
||||
// Needed when we cannot directly include CompositorParent.h since it includes
|
||||
// an IPDL-generated header (e.g. in widget/cocoa/nsChildView.mm; see Bug 719036).
|
||||
LayerManagerComposite* GetLayerManager(CompositorParent* aParent);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // mozilla_layers_CompositorCocoaWidgetHelper_h
|
||||
|
|
@ -62,6 +62,7 @@ namespace layers {
|
|||
|
||||
CompositorParent::LayerTreeState::LayerTreeState()
|
||||
: mParent(nullptr)
|
||||
, mLayerManager(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -263,6 +264,7 @@ CompositorParent::RecvWillStop()
|
|||
LayerTreeState* lts = &it->second;
|
||||
if (lts->mParent == this) {
|
||||
mLayerManager->ClearCachedResources(lts->mRoot);
|
||||
lts->mLayerManager = nullptr;
|
||||
}
|
||||
}
|
||||
mLayerManager->Destroy();
|
||||
|
@ -371,6 +373,7 @@ CompositorParent::ActorDestroy(ActorDestroyReason why)
|
|||
if (mLayerManager) {
|
||||
mLayerManager->Destroy();
|
||||
mLayerManager = nullptr;
|
||||
sIndirectLayerTrees[mRootLayerTreeID].mLayerManager = nullptr;
|
||||
mCompositionManager = nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -503,7 +506,7 @@ CompositorParent::NotifyShadowTreeTransaction(uint64_t aId, bool aIsFirstPaint)
|
|||
AutoResolveRefLayers resolve(mCompositionManager);
|
||||
mApzcTreeManager->UpdatePanZoomControllerTree(this, mLayerManager->GetRoot(), aIsFirstPaint, aId);
|
||||
|
||||
mLayerManager->AsLayerManagerComposite()->NotifyShadowTreeTransaction();
|
||||
mLayerManager->NotifyShadowTreeTransaction();
|
||||
}
|
||||
ScheduleComposition();
|
||||
}
|
||||
|
@ -734,6 +737,7 @@ CompositorParent::InitializeLayerManager(const nsTArray<LayersBackend>& aBackend
|
|||
|
||||
if (layerManager->Initialize()) {
|
||||
mLayerManager = layerManager;
|
||||
sIndirectLayerTrees[mRootLayerTreeID].mLayerManager = layerManager;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1071,8 +1075,8 @@ CrossProcessCompositorParent::AllocPLayerTransactionParent(const nsTArray<Layers
|
|||
{
|
||||
MOZ_ASSERT(aId != 0);
|
||||
|
||||
if (sIndirectLayerTrees[aId].mParent) {
|
||||
LayerManagerComposite* lm = sIndirectLayerTrees[aId].mParent->GetLayerManager();
|
||||
if (sIndirectLayerTrees[aId].mLayerManager) {
|
||||
LayerManagerComposite* lm = sIndirectLayerTrees[aId].mLayerManager;
|
||||
*aTextureFactoryIdentifier = lm->GetTextureFactoryIdentifier();
|
||||
*aSuccess = true;
|
||||
LayerTransactionParent* p = new LayerTransactionParent(lm, this, aId);
|
||||
|
|
|
@ -107,8 +107,6 @@ public:
|
|||
void ForceIsFirstPaint();
|
||||
void Destroy();
|
||||
|
||||
LayerManagerComposite* GetLayerManager() { return mLayerManager; }
|
||||
|
||||
void NotifyChildCreated(uint64_t aChild);
|
||||
|
||||
void AsyncRender();
|
||||
|
@ -203,6 +201,7 @@ public:
|
|||
nsRefPtr<Layer> mRoot;
|
||||
nsRefPtr<GeckoContentController> mController;
|
||||
CompositorParent* mParent;
|
||||
LayerManagerComposite* mLayerManager;
|
||||
TargetConfig mTargetConfig;
|
||||
};
|
||||
|
||||
|
|
|
@ -128,7 +128,6 @@ EXPORTS.mozilla.layers += [
|
|||
'ipc/CompositableForwarder.h',
|
||||
'ipc/CompositableTransactionParent.h',
|
||||
'ipc/CompositorChild.h',
|
||||
'ipc/CompositorCocoaWidgetHelper.h',
|
||||
'ipc/CompositorParent.h',
|
||||
'ipc/GeckoContentController.h',
|
||||
'ipc/GestureEventListener.h',
|
||||
|
@ -240,7 +239,6 @@ UNIFIED_SOURCES += [
|
|||
'ipc/Axis.cpp',
|
||||
'ipc/CompositableTransactionParent.cpp',
|
||||
'ipc/CompositorChild.cpp',
|
||||
'ipc/CompositorCocoaWidgetHelper.cpp',
|
||||
'ipc/CompositorParent.cpp',
|
||||
'ipc/GestureEventListener.cpp',
|
||||
'ipc/ImageBridgeChild.cpp',
|
||||
|
|
|
@ -63,7 +63,6 @@
|
|||
#include "GLContext.h"
|
||||
#include "GLUploadHelpers.h"
|
||||
#include "mozilla/layers/GLManager.h"
|
||||
#include "mozilla/layers/CompositorCocoaWidgetHelper.h"
|
||||
#include "mozilla/layers/CompositorOGL.h"
|
||||
#include "mozilla/layers/BasicCompositor.h"
|
||||
#include "gfxUtils.h"
|
||||
|
|
Загрузка…
Ссылка в новой задаче