Closed Bug 1057906 Opened 10 years ago Closed 10 years ago

Refactor the HQ scaling code to use RawAccessFrameRef and do some cleanup

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: seth, Assigned: seth)

References

Details

Attachments

(1 file)

Like the other followups of bug 1057894, this bug refactors existing code to use one of the new RAII smart handles - in this case RawAccessFrameRef - and cleans up the surrounding code while we're at it.

In this particular case, the target is the HQ scaling code, which can benefit from RawAccessFrameRef. Much refactoring and cleaning ensues.
Here's the patch. Things are a little saner afterwards.

One particular note: the existing code was quite worried about not calling accessors on imgFrame and the like off-main-thread. However, I don't think there's any good reason for this. It's possible things were different in the past, but calling things like GetImageData() off-main-thread while we hold a RawAccessFrameRef should be perfectly safe. I've modified the code accordingly.
Attachment #8478046 - Flags: review?(tnikkel)
Attachment #8478046 - Flags: review?(tnikkel) → review+
https://hg.mozilla.org/mozilla-central/rev/05cc7431a887
Status: NEW → 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: