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.
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.
Thanks for the review! Pushed: https://hg.mozilla.org/integration/mozilla-inbound/rev/05cc7431a887