Closed Bug 1446166 Opened 4 years ago Closed 4 years ago

Ensure that WebRenderUserData's are removed when the LayerManager is destroyed.

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: jrmuizel, Assigned: jrmuizel)

References

Details

Attachments

(1 file)

This let's us avoid having to check whether we have the right one when getting them.
Comment on attachment 8959348 [details]
Bug 1446166. Ensure that WebRenderUserData's are removed when LayerManager is destroyed.

https://reviewboard.mozilla.org/r/228188/#review234016

::: commit-message-32f22:3
(Diff revision 2)
> +Bug 1446166. Ensure that WebRenderUserData's are removed when LayerManager is destroyed. r=kats
> +
> +This let's avoid having to check whether we have the right one when getting them.

s/let's/lets/

::: gfx/layers/wr/WebRenderCommandBuilder.cpp:34
(Diff revision 2)
>    RemoveUnusedAndResetWebRenderUserData();
> +  MOZ_RELEASE_ASSERT(mWebRenderUserDatas.Count() == 0);

I don't know if this is sufficient. There might be some WebRenderUserData instances that got used on the last display list build and so are marked "used" at the point of this call to RemoveUnusedAndResetWebRenderUserData().

I think it would be better to make this function take a bool argument that makes it ignore the used flag and just unconditionally delete all the things, and set that argument here (but not at the other call site).
Attachment #8959348 - Flags: review?(bugmail)
Comment on attachment 8959348 [details]
Bug 1446166. Ensure that WebRenderUserData's are removed when LayerManager is destroyed.

https://reviewboard.mozilla.org/r/228188/#review234026

Thanks, that makes sense!
Attachment #8959348 - Flags: review?(bugmail) → review+
Pushed by jmuizelaar@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e7171c0f021f
Ensure that WebRenderUserData's are removed when LayerManager is destroyed. r=kats
https://hg.mozilla.org/mozilla-central/rev/e7171c0f021f
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Assignee: nobody → jmuizelaar
Depends on: 1446588
You need to log in before you can comment on or make changes to this bug.