Closed Bug 1401849 Opened 7 years ago Closed 7 years ago

Fix TabChild::mLayersConnected handling

Categories

(Core :: Graphics: Layers, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox57 --- unaffected
firefox58 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

(Whiteboard: [wr-mvp] [gfx-noted])

Attachments

(1 file)

TabChild::mLayersConnected seems not updated correctly in some situations.
Assignee: nobody → sotaro.ikeda.g
Default value of TabChild::mLayersConnected is true, but it should be false, since TabChild is not connected to layer when it was created. https://dxr.mozilla.org/mozilla-central/source/dom/ipc/TabChild.cpp#417
Attachment #8910602 - Flags: review?(bugmail)
Comment on attachment 8910602 [details] [diff] [review] patch - Fix TabChild::mLayersConnected handling Review of attachment 8910602 [details] [diff] [review]: ----------------------------------------------------------------- This looks ok to me, but to be honest I'm not fully confident on the DoFakeShow and ReinitRendering codepaths. Giving f+ but asking dvander to take a look as well. For context, I think this patch is intended to address bug 1399850.
Attachment #8910602 - Flags: review?(dvander)
Attachment #8910602 - Flags: review?(bugmail)
Attachment #8910602 - Flags: feedback+
Comment on attachment 8910602 [details] [diff] [review] patch - Fix TabChild::mLayersConnected handling Review of attachment 8910602 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/ipc/TabChild.cpp @@ +1173,5 @@ > const uint64_t& aLayersId, > const CompositorOptions& aCompositorOptions, > PRenderFrameChild* aRenderFrame, const ShowInfo& aShowInfo) > { > + mLayersConnected = aRenderFrame ? true : false; Is this redundant? It's going to be set in InitRenderingState.
Priority: -- → P3
Whiteboard: [gfx-noted]
Comment on attachment 8910602 [details] [diff] [review] patch - Fix TabChild::mLayersConnected handling Review of attachment 8910602 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/ipc/TabChild.cpp @@ +1173,5 @@ > const uint64_t& aLayersId, > const CompositorOptions& aCompositorOptions, > PRenderFrameChild* aRenderFrame, const ShowInfo& aShowInfo) > { > + mLayersConnected = aRenderFrame ? true : false; It is necessary, mLayersConnected is not set in TabChild::InitRenderingState(), but the value is used during creating LayerManager in PuppetWidget::GetLayerManager() in TabChild::InitRenderingState(). https://dxr.mozilla.org/mozilla-central/source/widget/PuppetWidget.cpp#599 Current implementation expects that mLayersConnected is set before calling TabChild::InitRenderingState(). It mimics how TabChild::RecvInitRendering() does. https://dxr.mozilla.org/mozilla-central/source/dom/ipc/TabChild.cpp#1267 TabChild::ReinitRendering() just updates mLayersConnected to true when the function succeeds.
Attachment #8910602 - Flags: review?(dvander) → review+
Pushed by sikeda@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/60e228af8582 Fix TabChild::mLayersConnected handling r=dvander
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Priority: P3 → P1
Whiteboard: [gfx-noted] → [wr-mvp] [gfx-noted]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: