Closed Bug 1060953 Opened 10 years ago Closed 10 years ago

Fix reference cycle in Direct2D 1.1 Snapshot

Categories

(Core :: Graphics, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

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

References

Details

Attachments

(1 file)

Currently D2D 1.1's snapshot holds a reference to the DrawTarget, and the DrawTarget holds a reference to its snapshot. That's not good.
Attachment #8481965 - Flags: review?(jmuizelaar)
Blocks: 902952
Comment on attachment 8481965 [details] [diff] [review] Fix reference cycle between DrawTargetD2D1 and SourceSurfaceD2D1 Review of attachment 8481965 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/2d/DrawTargetD2D1.cpp @@ +54,5 @@ > + > + // Targets depending on us can break that dependency, since we're obviously not going to > + // be modified in the future. > + for (TargetSet::iterator iter = mDependentTargets.begin(); > + iter != mDependentTargets.end(); iter++) { You can use: for (auto iter = mDependentTargets.begin(); iter != ...
Attachment #8481965 - Flags: review?(jmuizelaar) → review+
(In reply to Jeff Muizelaar [:jrmuizel] from comment #1) > Comment on attachment 8481965 [details] [diff] [review] > Fix reference cycle between DrawTargetD2D1 and SourceSurfaceD2D1 > > Review of attachment 8481965 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: gfx/2d/DrawTargetD2D1.cpp > @@ +54,5 @@ > > + > > + // Targets depending on us can break that dependency, since we're obviously not going to > > + // be modified in the future. > > + for (TargetSet::iterator iter = mDependentTargets.begin(); > > + iter != mDependentTargets.end(); iter++) { > > You can use: > > for (auto iter = mDependentTargets.begin(); iter != ... I'm not a big fan of auto, but for this case it's pretty nice. Do all the platforms we need to compile on support auto these days?
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: