Bug 1315974 - Have the CompositorBridgeChild take a LayerManager instead of a ClientLayerManager. r=dvander

MozReview-Commit-ID: CPTCQgIl5ad

--HG--
extra : rebase_source : dabc583be1de1700c35444e517070455349ea9b8
This commit is contained in:
Kartikaya Gupta 2016-11-08 10:42:19 -05:00
Родитель 1459d5aa54
Коммит c19a47d368
6 изменённых файлов: 15 добавлений и 15 удалений

Просмотреть файл

@ -415,7 +415,7 @@ GPUProcessManager::DestroyProcess()
RefPtr<CompositorSession>
GPUProcessManager::CreateTopLevelCompositor(nsBaseWidget* aWidget,
ClientLayerManager* aLayerManager,
LayerManager* aLayerManager,
CSSToLayoutDeviceScale aScale,
bool aUseAPZ,
bool aUseExternalSurfaceSize,
@ -456,7 +456,7 @@ GPUProcessManager::CreateTopLevelCompositor(nsBaseWidget* aWidget,
RefPtr<CompositorSession>
GPUProcessManager::CreateRemoteSession(nsBaseWidget* aWidget,
ClientLayerManager* aLayerManager,
LayerManager* aLayerManager,
const uint64_t& aRootLayerTreeId,
CSSToLayoutDeviceScale aScale,
bool aUseAPZ,

Просмотреть файл

@ -25,7 +25,6 @@ namespace mozilla {
namespace layers {
class IAPZCTreeManager;
class CompositorSession;
class ClientLayerManager;
class CompositorUpdateObserver;
class PCompositorBridgeChild;
class PImageBridgeChild;
@ -57,10 +56,10 @@ class GPUProcessManager final : public GPUProcessHost::Listener
{
friend class layers::RemoteCompositorSession;
typedef layers::ClientLayerManager ClientLayerManager;
typedef layers::CompositorSession CompositorSession;
typedef layers::IAPZCTreeManager IAPZCTreeManager;
typedef layers::CompositorUpdateObserver CompositorUpdateObserver;
typedef layers::IAPZCTreeManager IAPZCTreeManager;
typedef layers::LayerManager LayerManager;
typedef layers::PCompositorBridgeChild PCompositorBridgeChild;
typedef layers::PImageBridgeChild PImageBridgeChild;
typedef layers::RemoteCompositorSession RemoteCompositorSession;
@ -82,7 +81,7 @@ public:
RefPtr<CompositorSession> CreateTopLevelCompositor(
nsBaseWidget* aWidget,
ClientLayerManager* aLayerManager,
LayerManager* aLayerManager,
CSSToLayoutDeviceScale aScale,
bool aUseAPZ,
bool aUseExternalSurfaceSize,
@ -183,7 +182,7 @@ private:
RefPtr<CompositorSession> CreateRemoteSession(
nsBaseWidget* aWidget,
ClientLayerManager* aLayerManager,
LayerManager* aLayerManager,
const uint64_t& aRootLayerTreeId,
CSSToLayoutDeviceScale aScale,
bool aUseAPZ,

Просмотреть файл

@ -24,7 +24,7 @@ InProcessCompositorSession::InProcessCompositorSession(widget::CompositorWidget*
/* static */ RefPtr<InProcessCompositorSession>
InProcessCompositorSession::Create(nsIWidget* aWidget,
ClientLayerManager* aLayerManager,
LayerManager* aLayerManager,
const uint64_t& aRootLayerTreeId,
CSSToLayoutDeviceScale aScale,
bool aUseAPZ,

Просмотреть файл

@ -20,7 +20,7 @@ class InProcessCompositorSession final : public CompositorSession
public:
static RefPtr<InProcessCompositorSession> Create(
nsIWidget* aWidget,
ClientLayerManager* aLayerManager,
LayerManager* aLayerManager,
const uint64_t& aRootLayerTreeId,
CSSToLayoutDeviceScale aScale,
bool aUseAPZ,

Просмотреть файл

@ -74,7 +74,7 @@ static StaticRefPtr<CompositorBridgeChild> sCompositorBridge;
Atomic<int32_t> KnowsCompositor::sSerialCounter(0);
CompositorBridgeChild::CompositorBridgeChild(ClientLayerManager *aLayerManager)
CompositorBridgeChild::CompositorBridgeChild(LayerManager *aLayerManager)
: mLayerManager(aLayerManager)
, mCanSend(false)
, mFwdTransactionId(0)
@ -256,7 +256,7 @@ CompositorBridgeChild::InitSameProcess(widget::CompositorWidget* aWidget,
/* static */ RefPtr<CompositorBridgeChild>
CompositorBridgeChild::CreateRemote(const uint64_t& aProcessToken,
ClientLayerManager* aLayerManager,
LayerManager* aLayerManager,
Endpoint<PCompositorBridgeChild>&& aEndpoint)
{
RefPtr<CompositorBridgeChild> child = new CompositorBridgeChild(aLayerManager);
@ -526,7 +526,8 @@ CompositorBridgeChild::RecvDidComposite(const uint64_t& aId, const uint64_t& aTr
{
if (mLayerManager) {
MOZ_ASSERT(aId == 0);
RefPtr<ClientLayerManager> m = mLayerManager;
RefPtr<ClientLayerManager> m = mLayerManager->AsClientLayerManager();
MOZ_ASSERT(m);
m->DidComposite(aTransactionId, aCompositeStart, aCompositeEnd);
} else if (aId != 0) {
RefPtr<dom::TabChild> child = dom::TabChild::GetFrom(aId);

Просмотреть файл

@ -50,7 +50,7 @@ class CompositorBridgeChild final : public PCompositorBridgeChild,
public:
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(CompositorBridgeChild, override);
explicit CompositorBridgeChild(ClientLayerManager *aLayerManager);
explicit CompositorBridgeChild(LayerManager *aLayerManager);
void Destroy();
@ -69,7 +69,7 @@ public:
static RefPtr<CompositorBridgeChild> CreateRemote(
const uint64_t& aProcessToken,
ClientLayerManager* aLayerManager,
LayerManager* aLayerManager,
Endpoint<PCompositorBridgeChild>&& aEndpoint);
/**
@ -282,7 +282,7 @@ private:
uint32_t mAPZCId;
};
RefPtr<ClientLayerManager> mLayerManager;
RefPtr<LayerManager> mLayerManager;
// When not multi-process, hold a reference to the CompositorBridgeParent to keep it
// alive. This reference should be null in multi-process.
RefPtr<CompositorBridgeParent> mCompositorBridgeParent;