Open Bug 1166521 Opened 9 years ago Updated 2 years ago

Store images as YUV instead of RGB when possible

Categories

(Core :: Graphics: ImageLib, enhancement)

enhancement

Tracking

()

People

(Reporter: seth, Unassigned)

References

Details

(Keywords: parity-chrome, Whiteboard: [gfx-noted])

Since images in YUV format can consume half the memory of the same image in RGB format, we should store images in YUV form when possible. In particular, since JPEGs are natively YUV, we can store them as YUV losslessly.

There's broad support for YUV textures on most GPUs, but our software rendering backends aren't compatible with YUV, so we'll only be able to do this with layerized images.

Let's consider this a metabug for implementing this feature, because there are several things that need to be done:

- We need to add support for YUV images to the SurfaceCache, RasterImage, and imgFrame.

- We need to update nsJPEGDecoder to support generating YUV images.

- We should look into support downscale-during-decode in combination with YUV output.

- We need to update our image layerization heuristics to ensure that we can use YUV image surfaces whenever possible.

- We need to look into whether we need to support any devices that do not support YUV textures, and if so, detect that situation and disable them.
Whiteboard: [gfx-noted]
See Also: → 1403618, 1621548
Type: defect → enhancement
See Also: → consolidation
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.