Closed Bug 1143509 Opened 5 years ago Closed 5 years ago
Unlock surfaces for downscale-during-decode before creating a new decoder
Originally the patch in bug 1122446, which made us unlock existing surfaces for a downscale-during-decode image when decoding, was written in the expectation that bug 1117607 would have already landed, making us allocate all frames of an image (even the first) asynchronously. However, bug 1117607 did not end up landing. The result is that the behavior is different than expected: originally, the intention was that all versions of the image *except* the one we just started decoding would become unlocked. However, with things as they stand, all versions *including* the one we just started decoding are unlocked. That means that we can end up with images that are locked, but none of their surfaces are locked, and that's not great. Fixing this is easy - we just need to move the UnlockSurfaces() call before we call CreateDecoder(), so that the new surface is allocated after UnlockSurfaces() gets called.
Here's the patch.
Attachment #8577797 - Flags: review?(dholbert)
Attachment #8577797 - Flags: review?(dholbert) → review+
Thanks for the review! Pushed: https://hg.mozilla.org/integration/mozilla-inbound/rev/a86ab0a7bce7
You need to log in before you can comment on or make changes to this bug.