Closed Bug 1101130 Opened 10 years ago Closed 10 years ago

Direct2D 1.1 doesn't clean up well after itself

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: bas.schouten, Assigned: bas.schouten)

Details

Attachments

(2 files)

In several places Direct2D 1.1 is not cleaning up the resources it uses on shutdown. We should fix this so that the Debug layers for D2D and D3D11 may give us useful leak info when we're looking for it.
Attachment #8524795 - Flags: review?(jmuizelaar) → review+
https://hg.mozilla.org/mozilla-central/rev/c3fbfee4a06b
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Comment on attachment 8524795 [details] [diff] [review]
Make Direct2D 1.1 clean up its resources on shutdown

> void
> Factory::D2DCleanup()
> {
>+  if (mD2D1Device) {
>+    mD2D1Device->Release();
>+    mD2D1Device = nullptr;
>+  }
>   DrawTargetD2D::CleanupD2D();
>+  DrawTargetD2D1::CleanupD2D();
> }
This bit seems to be missing a #ifdef USE_D2D1_1
(I'll post a patch if I can get my build to finish.)
Attached patch Bustage fixSplinter Review
Attachment #8527194 - Flags: review?(jmuizelaar)
Attachment #8527194 - Flags: review?(bas)
Attachment #8527194 - Flags: review?(bas) → review+
Attachment #8527194 - Flags: review?(jmuizelaar)
You need to log in before you can comment on or make changes to this bug.