зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1570369 - Part 2: Use IPDL refcounted for PAPZInputBridge, r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D40253 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
57067bd337
Коммит
f9fb4fc118
|
@ -89,19 +89,6 @@ base::ProcessHandle GPUChild::GetChildProcessHandle() {
|
|||
return mHost->GetChildProcessHandle();
|
||||
}
|
||||
|
||||
PAPZInputBridgeChild* GPUChild::AllocPAPZInputBridgeChild(
|
||||
const LayersId& aLayersId) {
|
||||
APZInputBridgeChild* child = new APZInputBridgeChild();
|
||||
child->AddRef();
|
||||
return child;
|
||||
}
|
||||
|
||||
bool GPUChild::DeallocPAPZInputBridgeChild(PAPZInputBridgeChild* aActor) {
|
||||
APZInputBridgeChild* child = static_cast<APZInputBridgeChild*>(aActor);
|
||||
child->Release();
|
||||
return true;
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult GPUChild::RecvInitComplete(const GPUDeviceData& aData) {
|
||||
// We synchronously requested GPU parameters before this arrived.
|
||||
if (mGPUReady) {
|
||||
|
|
|
@ -35,9 +35,6 @@ class GPUChild final : public PGPUChild, public gfxVarReceiver {
|
|||
bool EnsureGPUReady();
|
||||
base::ProcessHandle GetChildProcessHandle();
|
||||
|
||||
PAPZInputBridgeChild* AllocPAPZInputBridgeChild(const LayersId& aLayersId);
|
||||
bool DeallocPAPZInputBridgeChild(PAPZInputBridgeChild* aActor);
|
||||
|
||||
// gfxVarReceiver overrides.
|
||||
void OnVarChanged(const GfxVarUpdate& aVar) override;
|
||||
|
||||
|
|
|
@ -160,17 +160,9 @@ void GPUParent::NotifyDeviceReset() {
|
|||
Unused << SendNotifyDeviceReset(data);
|
||||
}
|
||||
|
||||
PAPZInputBridgeParent* GPUParent::AllocPAPZInputBridgeParent(
|
||||
already_AddRefed<PAPZInputBridgeParent> GPUParent::AllocPAPZInputBridgeParent(
|
||||
const LayersId& aLayersId) {
|
||||
APZInputBridgeParent* parent = new APZInputBridgeParent(aLayersId);
|
||||
parent->AddRef();
|
||||
return parent;
|
||||
}
|
||||
|
||||
bool GPUParent::DeallocPAPZInputBridgeParent(PAPZInputBridgeParent* aActor) {
|
||||
APZInputBridgeParent* parent = static_cast<APZInputBridgeParent*>(aActor);
|
||||
parent->Release();
|
||||
return true;
|
||||
return MakeAndAddRef<APZInputBridgeParent>(aLayersId);
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult GPUParent::RecvInit(
|
||||
|
|
|
@ -34,8 +34,8 @@ class GPUParent final : public PGPUParent {
|
|||
MessageLoop* aIOLoop, IPC::Channel* aChannel);
|
||||
void NotifyDeviceReset();
|
||||
|
||||
PAPZInputBridgeParent* AllocPAPZInputBridgeParent(const LayersId& aLayersId);
|
||||
bool DeallocPAPZInputBridgeParent(PAPZInputBridgeParent* aActor);
|
||||
already_AddRefed<PAPZInputBridgeParent> AllocPAPZInputBridgeParent(
|
||||
const LayersId& aLayersId);
|
||||
|
||||
mozilla::ipc::IPCResult RecvInit(nsTArray<GfxVarUpdate>&& vars,
|
||||
const DevicePrefs& devicePrefs,
|
||||
|
|
|
@ -812,12 +812,11 @@ RefPtr<CompositorSession> GPUProcessManager::CreateRemoteSession(
|
|||
}
|
||||
apz = static_cast<APZCTreeManagerChild*>(papz);
|
||||
|
||||
PAPZInputBridgeChild* pinput =
|
||||
mGPUChild->SendPAPZInputBridgeConstructor(aRootLayerTreeId);
|
||||
if (!pinput) {
|
||||
RefPtr<APZInputBridgeChild> pinput = new APZInputBridgeChild();
|
||||
if (!mGPUChild->SendPAPZInputBridgeConstructor(pinput, aRootLayerTreeId)) {
|
||||
return nullptr;
|
||||
}
|
||||
apz->SetInputBridge(static_cast<APZInputBridgeChild*>(pinput));
|
||||
apz->SetInputBridge(pinput);
|
||||
}
|
||||
|
||||
RefPtr<RemoteCompositorSession> session = new RemoteCompositorSession(
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace mozilla {
|
|||
namespace layers {
|
||||
|
||||
class APZInputBridgeChild : public PAPZInputBridgeChild, public APZInputBridge {
|
||||
NS_INLINE_DECL_REFCOUNTING(APZInputBridgeChild)
|
||||
NS_INLINE_DECL_REFCOUNTING(APZInputBridgeChild, final)
|
||||
|
||||
public:
|
||||
APZInputBridgeChild();
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace layers {
|
|||
class IAPZCTreeManager;
|
||||
|
||||
class APZInputBridgeParent : public PAPZInputBridgeParent {
|
||||
NS_INLINE_DECL_REFCOUNTING(APZInputBridgeParent)
|
||||
NS_INLINE_DECL_REFCOUNTING(APZInputBridgeParent, final)
|
||||
|
||||
public:
|
||||
explicit APZInputBridgeParent(const LayersId& aLayersId);
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace layers {
|
|||
* and the parent side lives on the main thread in the GPU process. If there
|
||||
* is no GPU process, then this protocol is not instantiated.
|
||||
*/
|
||||
sync protocol PAPZInputBridge
|
||||
sync refcounted protocol PAPZInputBridge
|
||||
{
|
||||
manager PGPU;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче