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

RESOLVED FIXED in mozilla35

Status

()

Core
ImageLib
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: seth, Assigned: seth)

Tracking

unspecified
mozilla35
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
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.
(Assignee)

Comment 1

3 years ago
Created attachment 8478046 [details] [diff] [review]
Use RawAccessFrameRef in the HQ-scaling code and clean up

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+
(Assignee)

Comment 2

3 years ago
Thanks for the review!

Pushed:

https://hg.mozilla.org/integration/mozilla-inbound/rev/05cc7431a887
https://hg.mozilla.org/mozilla-central/rev/05cc7431a887
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.