Closed Bug 1298245 Opened 3 years ago Closed 3 years ago

Allow initializing APZ when we have a RemoteCompositorSession

Categories

(Core :: Graphics, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: rhunt, Assigned: rhunt)

Details

Attachments

(1 file, 1 obsolete file)

Hook up creation of APZ protocols when we have a RemoteCompositorSession.
Attached patch hookup-rcp.patch (obsolete) — Splinter Review
Enable the creation of APZ in RemoteCompositorSession.
Attachment #8785197 - Flags: review?(dvander)
Comment on attachment 8785197 [details] [diff] [review]
hookup-rcp.patch

Review of attachment 8785197 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, r=me with nits picked.

::: gfx/ipc/GPUProcessManager.cpp
@@ +394,5 @@
>    if (!child->SendInitialize(aRootLayerTreeId)) {
>      return nullptr;
>    }
>  
> +  APZCTreeManagerChild* apz = nullptr;

Use RefPtr here instead, and then you can remove the AddRef below.

::: gfx/ipc/RemoteCompositorSession.cpp
@@ +37,4 @@
>  }
>  
>  already_AddRefed<IAPZCTreeManager>
>  RemoteCompositorSession::GetAPZCTreeManager() const

It's cleaner to just change the return type to RefPtr<IAPZCTreeManager>. already_AddRefed is not buying us anything here.

::: gfx/layers/ipc/CompositorBridgeParent.cpp
@@ +1357,5 @@
>  PAPZCTreeManagerParent*
>  CompositorBridgeParent::AllocPAPZCTreeManagerParent(const uint64_t& aLayersId)
>  {
> +  // The main process should only be using the mRootLayerTreeID.
> +  MOZ_ASSERT(aLayersId == mRootLayerTreeID);

We usually pass 0 as the layers id, for window messages that are shared with CrossProcessCompositorBridge.

@@ +1383,5 @@
>  PAPZParent*
>  CompositorBridgeParent::AllocPAPZParent(const uint64_t& aLayersId)
>  {
> +  // The main process should only be using the mRootLayerTreeID.
> +  MOZ_ASSERT(aLayersId == mRootLayerTreeID);

Ditto here.

@@ +1410,5 @@
>  
>  bool
>  CompositorBridgeParent::RecvAsyncPanZoomEnabled(const uint64_t& aLayersId, bool* aHasAPZ)
>  {
> +  MOZ_ASSERT(aLayersId == mRootLayerTreeID);

Ditto.
Attachment #8785197 - Flags: review?(dvander) → review+
Attached patch hookup-rcs.patchSplinter Review
Fixes for the nits.
Attachment #8785197 - Attachment is obsolete: true
Keywords: checkin-needed
Summary: Hook up remote APZ → Allow initializing APZ when we have a RemoteCompositorSession
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/81de0e995050
Hook up creation of OOP APZ for main process. r=dvander
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/81de0e995050
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.