Closed Bug 1367538 Opened 4 years ago Closed 4 years ago
Target Recordings are kept alive by Scaled Fonts
DrawTargetRecording::FillGlyph adds a UserData containing a reference to the Recording. This keeps the recordings alive as long as the ScaledFont is around. This is likely not the best. We only want the UserData around while we're recording. After we're done we don't need them anymore.
SourceSurfaces do this too which seems to be an even greater cause of staying around.
This helps keep us from accumulating all of the recorders. The basic idea is to track weak references to the SourceSurfaces and Fonts that we add UserData to in DrawEventRecorderPrivate and then clear these UserData's when we're done recording. This adds a RemoveAndDestroy helper to UserData to make this possible.
Assignee: nobody → jmuizelaar
Attachment #8871889 - Flags: review?(lsalzman)
Attachment #8871889 - Flags: review?(lsalzman) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/5f65427cd949 Clear user data after we're done with the recorder. r=lsalzman
You need to log in before you can comment on or make changes to this bug.