Closed Bug 977459 Opened 6 years ago Closed 5 years ago
Image the ability to hold multiple decoded versions of an image
RasterImage's inability to hold multiple decoded versions of the same image is the underlying cause for problems all over the place, from media fragment implementation issues, to mixed HTML/WebGL context causing duplicate decodes, to duplicate GET requests for the same image, to difficulties implementing a clean solution for decode-and-downside. It's time to fix this problem. It's clearly a major limitation that's causing bugs and bad architectural decisions in all sorts of code related to images. I've CC'ed people I thought would be interested. Feel free to un-CC if my guess was wrong.
This doesn't, strictly speaking, block a lot of things, since we already have hacks in place for many of them, so I'll just mention related bugs as I come across them. Four I know offhand are bug 854795, bug 583351, bug 790640, and bug 952354.
Can you please clarify what this bug is about for a non-imagelib-kind-of-guy who I am? :-) Thanks!
(In reply to :Ehsan Akhgari (needinfo? me!) (slow responsiveness, emailapocalypse) from comment #2) > Can you please clarify what this bug is about for a non-imagelib-kind-of-guy > who I am? :-) > > Thanks! If we need more than one decoded version of an image (different size, premultiplied alpha vs. not, different layer of an ICO, whatever), today we have to do ugly hacks or repeatedly throw away and redecode stuff. This is because RasterImage can't hold more than one decoded version of an image. I'm going to fix that.
Since there is no ETA yet on the DrawAPI refactoring that this one depends on, is there a possibility to get an intermediate fix in so at the very least HQ downscaling can be enabled without penalty? Simply allocating independent buffers for downscaled images (since it only happens when the images are of the same src) should work? i.e.: treat al downscaled images as-if they are unique.
(In reply to Mark Straver from comment #5) > Since there is no ETA yet on the DrawAPI refactoring that this one depends > on No ETA? It's already landed, and the bug is resolved! This bug will be fixed in two stages. I'm testing a patch for the HQ downscaling case right now, and will probably have it up for review tonight or tomorrow. The general decoding case probably isn't far off either.
(In reply to Seth Fowler [:seth] from comment #6) > No ETA? It's already landed, and the bug is resolved! It landed after my comment ;)
(In reply to Mark Straver from comment #7) > It landed after my comment ;) Yeah, the individual bugs the metabug was tracking landed earlier, but there was a delay before I resolved the metabug itself. Which leads us to the conclusion that it landed before your comment but was, I suppose, resolved after your comment. =)
I don't want to hijack this bug, but, Seth, do you know if your current work on RasterImage could fix the bug 745549 (by side-effect maybe)?
(In reply to Loic from comment #9) > I don't want to hijack this bug, but, Seth, do you know if your current work > on RasterImage could fix the bug 745549 (by side-effect maybe)? It won't - that bug has more to do with the layers system. I'll add some needinfo's on that bug to see if we can get it moving, but I myself won't have time to tackle it immediately.
Wow, finally done! Resolving.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.