Closed Bug 1405952 Opened 7 years ago Closed 7 years ago

Remove PWebRenderBridge::SetDisplayListSync

Categories

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

enhancement

Tracking

()

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

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

(Whiteboard: [wr-mvp])

Attachments

(1 file, 2 obsolete files)

SetDisplayListSync seems not necessary any more. It is used only when WebRenderLayerManager::mTarget exists. But WebRenderLayerManager::MakeSnapshotIfRequired() does not need it.
Assignee: nobody → sotaro.ikeda.g
Attachment #8915468 - Flags: review?(bugmail)
(In reply to Sotaro Ikeda [:sotaro] from comment #0)
> SetDisplayListSync seems not necessary any more. It is used only when
> WebRenderLayerManager::mTarget exists. But
> WebRenderLayerManager::MakeSnapshotIfRequired() does not need it.

I don't understand this. It seems like MakeSnapshotIfRequired() still draws into mTarget, so doesn't it need the display list to have been sent to webrender synchronously? How we can we guarantee that the correct stuff ends up in mTarget otherwise?
Whiteboard: [wr-mvp] [triage]
Whiteboard: [wr-mvp] [triage]
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #3)
> 
> I don't understand this. It seems like MakeSnapshotIfRequired() still draws
> into mTarget, so doesn't it need the display list to have been sent to
> webrender synchronously? How we can we guarantee that the correct stuff ends
> up in mTarget otherwise?

SetDisplayListSync seems to be used to make that the peer WebRenderBridgeParent already received the DisplayList when MakeSnapshotIfRequired() is called. But it is not necessary. Because the order of messages(between 'async SetDisplayList' and 'sync GetSnapshot') is not changed if the message are sent by same WebRenderBridgeChild instance. This IPC characteristic is used for example by Bug 1364626 to address a reftest problem. Then when WebRenderBridgeParent::RecvGetSnapshot() was called, the peer WebRenderBridgeParent pushed the correct display list. WebRenderBridgeParent::RecvGetSnapshot() takes the snap shot synchronously, then we could get expected snapshot. Therefor I could not find the necessity of SetDisplayListSync usage. If reftest want to wait transaction complete WebRenderLayerManager::WaitOnTransactionProcessed() is used for it.

It is my understanding for taking snapshot. Is there a problem that I did not recognize?
Comment on attachment 8915468 [details] [diff] [review]
patch - Remove PWebRenderBridge::SetDisplayListSync

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

That makes sense, thanks for the explanation!
Attachment #8915468 - Flags: review?(bugmail) → review+
Rebased.
Attachment #8915468 - Attachment is obsolete: true
Attachment #8916174 - Flags: review+
Comment on attachment 8916174 [details] [diff] [review]
patch - Remove PWebRenderBridge::SetDisplayListSync

:kanru, can you review the patch. The change to sync-messages.ini needs IPC peer review.
Attachment #8916174 - Flags: review?(kchen)
:kanru, review ping.
Flags: needinfo?(kchen)
Attachment #8916174 - Flags: review?(kchen) → review+
Flags: needinfo?(kchen)
Thanks!
Rebased.
Attachment #8916174 - Attachment is obsolete: true
Attachment #8920519 - Flags: review+
Pushed by sikeda@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/bbecf147fb53
Remove PWebRenderBridge::SetDisplayListSync r=kats,kanru
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [wr-mvp]
https://hg.mozilla.org/mozilla-central/rev/bbecf147fb53
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: