Reorient images during decoding
Categories
(Core :: Graphics: ImageLib, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox95 | --- | fixed |
People
(Reporter: aosmond, Assigned: aosmond)
References
Details
Attachments
(6 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
Right now all JPEG and AVIF images that have an EXIF non-identity orientation are reoriented on the main thread. This is done by redrawing into a new surface, which is not a SourceSurfaceSharedData surface, which means we do extra copies (and hold onto extra memory) for every oriented image. In order to get rid of ImageContainers, which is the only level of caching saving us from even more copies, we need to resolve this. In this bug we will move the default reorientation into the decoder pipeline and hide that detail from the consumers of imagelib.
Assignee | ||
Comment 1•3 years ago
|
||
This is a new swizzle operation which allows us process a reorientation
row by row into its new orientation. This will be used in a later part
in the series in the image decoding pipeline.
Assignee | ||
Comment 2•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
|
||
Rather than change every use of IntSize/Rect/Point in image/, this patch
attempts to draw the line at the relevant parts of the decoding pipeline
to prevent confusion about which size and orientation we are working
with.
Assignee | ||
Comment 4•3 years ago
|
||
This part hooks up the swizzling code from earlier to the AVIF and JPEG
decoder pipelines.
Assignee | ||
Comment 5•3 years ago
|
||
This is now all handled in the layers below.
Assignee | ||
Comment 6•3 years ago
|
||
Assignee | ||
Comment 7•3 years ago
|
||
Pushed by aosmond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b59e36f7d5db Part 1. Add swizzling support for reorienting by row. r=tnikkel https://hg.mozilla.org/integration/autoland/rev/a70457bd2f8b Part 2. Move OrientedPixel and related to image/Orientation.h. r=tnikkel https://hg.mozilla.org/integration/autoland/rev/f1e959fe505b Part 3. Refactor decoder pipeline to partially use Unoriented/OrientedPixel. r=tnikkel https://hg.mozilla.org/integration/autoland/rev/b3d0a986a16b Part 4. Add/use reorienting decoding pipeline. r=tnikkel https://hg.mozilla.org/integration/autoland/rev/3f78ef2ad9a9 Part 5. Remove reorientation code from RasterImage. r=tnikkel https://hg.mozilla.org/integration/autoland/rev/2278746d5589 Part 6. Update test annotations. r=tnikkel
Comment 9•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b59e36f7d5db
https://hg.mozilla.org/mozilla-central/rev/a70457bd2f8b
https://hg.mozilla.org/mozilla-central/rev/f1e959fe505b
https://hg.mozilla.org/mozilla-central/rev/b3d0a986a16b
https://hg.mozilla.org/mozilla-central/rev/3f78ef2ad9a9
https://hg.mozilla.org/mozilla-central/rev/2278746d5589
Description
•