Make a thread-agnostic raw decoder class that doesn't depend on imagelib




5 years ago
2 years ago


(Reporter: bbondy, Unassigned)


(Blocks: 1 bug)

22 Branch
Windows 8

Firefox Tracking Flags

(Not tracked)




5 years ago
ImageLib currently has an assertion that makes off the main thread decoding impossible. I'm sure there are good reasons to have this assertion though because of things like multi threaded decoding , discard tracker, ... 

Most users want to pass the encoded things onto other things in gecko, which requires imglib classes to be around.

There are cases that we really do want simple decoding of things off the main thread, such as JumpListBuilder and favicon desktop shortcuts.

It would be nice to have a rawdecoders concept that has no strings attached and then the normal decoders use those rawdecoders.
Summary: Allow image decoding to happen off the main thread → Make a thread-agnostic raw decoder class that doesn't depend on imagelib
Whiteboard: [mentor=joe][lang=c++] → [][lang=c++]


5 years ago
Blocks: 876690
This is likely to be a very involved project, fwiw. This shouldn't be your first or even fourth imagelib project. You'll need to understand how imgStatusTracker, RasterImage, and Decoder all interact to refactor decoding out into a raw class.
Seth, would you mind taking over mentorship for this bug, or recommend somebody who could? If not we should remove the mentorship decorations.
Flags: needinfo?(seth)
Flags: needinfo?(seth)
Whiteboard: [][lang=c++]
It's unclear to me whether anyone needs more than what we've already implemented in this area. It's already possible to run a Decoder independent of RasterImage et al. and get a SourceSurface out of it. That can happen completely off-main-thread, as well. (None of this was true when the bug was originally filed.) ImageOps::DecodeToSurface() provides a convenient API for this.

I'm going to resolve this bug, because beyond what's already been implemented it's not clear what independence from ImageLib would mean - after all, the decoders themselves are part of ImageLib!
Last Resolved: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.