Closed Bug 1871613 Opened 10 months ago Closed 10 months ago

CanvasDrawEventRecorder no longer frees external surfaces used during recording

Categories

(Core :: Graphics: Canvas2D, defect, P3)

defect

Tracking

()

RESOLVED FIXED
123 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox121 --- unaffected
firefox122 --- unaffected
firefox123 --- fixed

People

(Reporter: aosmond, Assigned: aosmond)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

We no longer forward textures with RemoteTextureMap, hence this method no longer gets called:
https://searchfox.org/mozilla-central/rev/05178ae3d8ed27d47b340094de52bd3f572a5e1d/gfx/layers/ipc/CanvasChild.cpp#265

As such these external surfaces never get freed. We should just check when we are clearing resources and starting the next recording.

This patch makes CanvasDrawEventRecorder track what eventCount we
recorded an external surface reference. When the reader has increment
its processedCount above that, we will release our reference as it
should have acquired a strong reference to the data. This was previously
done when we forwarded the texture, but with remote textures, we no
longer have this event. Now we check when we start a new recording, or
attempt to clear cached resources.

Set release status flags based on info from the regressing bug 1871467

Pushed by aosmond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/855ab22c063e Ensure CanvasDrawEventRecorder releases external surface dependencies. r=gfx-reviewers,lsalzman
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
Regressions: 1920660
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: