Closed Bug 876687 Opened 7 years ago Closed 4 years ago

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


(Core :: ImageLib, defect)

22 Branch
Windows 8
Not set





(Reporter: bbondy, Unassigned)


(Blocks 1 open bug)


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++]
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!
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.