Closed Bug 980436 Opened 11 years ago Closed 11 years ago

Fix widget/windows/nsDragService.cpp's use of DataSourceSurface::Map() the Moz2D conversion

Categories

(Core :: Graphics, defect)

29 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: jwatt, Assigned: jwatt)

References

Details

Attachments

(1 file)

Bug 962786 left widget/windows/nsDragService.cpp in a bit of a weird state. It Map()'s a DataSourceSurface without actually using the map, and fails to call Unmap() at multiple return points. It also seems to still be using a gfxImageSurface to do the drawing.
Depends on: 980547
Attached patch patchSplinter Review
Attachment #8387194 - Flags: review?(matt.woodrow)
The code for CopyPixelDataToPackedArray is in bug 980547.
Comment on attachment 8387194 [details] [diff] [review] patch Review of attachment 8387194 [details] [diff] [review]: ----------------------------------------------------------------- ::: widget/windows/nsDragService.cpp @@ +112,5 @@ > + dataSurface->GetSize(), > + map.mStride, > + dataSurface->GetFromat()); > + if (!dt) { > + dataSurface->Unmap(); FWIW, I am hugely for a RAII class to prevent needing to do this :)
Attachment #8387194 - Flags: review?(matt.woodrow) → review+
Depends on: 980885
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: