Closed
Bug 1470447
Opened 6 years ago
Closed 6 years ago
JPEG decoder should post an invalidation for each row
Categories
(Core :: Graphics: ImageLib, enhancement, P3)
Core
Graphics: ImageLib
Tracking
()
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: aosmond, Assigned: aosmond)
Details
(Keywords: perf, Whiteboard: [gfx-noted])
Attachments
(1 file, 1 obsolete file)
4.56 KB,
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
Unlike the PNG/BMP decoders, the JPEG decoder batches up its PostInvalidation calls after it has decoded every row that it was able to depending on how much input was available to process. This can make the decoding/displaying seem more janky than it really is because of the delay and then display of a large chunk. Combining this with bug 1469964 ensures we split the texture upload in smaller chunks at a time, allowing scrolling to appear slightly smoother.
Assignee | ||
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
Comment on attachment 8987071 [details] [diff] [review] 0003-Bug-XXX-JPEG-decoder.patch Review of attachment 8987071 [details] [diff] [review]: ----------------------------------------------------------------- ::: image/decoders/nsJPEGDecoder.cpp @@ +672,5 @@ > } > if (mDownscaler) { > mDownscaler->CommitRow(); > } > + PostInvalidationIfNeeded(top); Is it worth adding something like, after the declaration of `top`, above: auto invalidator = MakeScopeExit([&]() { PostInvalidationIfNeeded(top); }); and removing the calls to PostInvalidationIfNeeded, so that if new paths through the loop are added, somebody doesn't have to remember to add new PostInvalidationIfNeeded calls? The current patch might be faster, not sure.
Updated•6 years ago
|
Updated•6 years ago
|
Whiteboard: [gfx-noted] [qf] → [gfx-noted] [qf:p3:f64]
Assignee | ||
Comment 3•6 years ago
|
||
(In reply to Nathan Froyd [:froydnj] (away until 16 July 2018) from comment #2) > Comment on attachment 8987071 [details] [diff] [review] > 0003-Bug-XXX-JPEG-decoder.patch > > Review of attachment 8987071 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: image/decoders/nsJPEGDecoder.cpp > @@ +672,5 @@ > > } > > if (mDownscaler) { > > mDownscaler->CommitRow(); > > } > > + PostInvalidationIfNeeded(top); > > Is it worth adding something like, after the declaration of `top`, above: > > auto invalidator = MakeScopeExit([&]() { PostInvalidationIfNeeded(top); }); > > and removing the calls to PostInvalidationIfNeeded, so that if new paths > through the loop are added, somebody doesn't have to remember to add new > PostInvalidationIfNeeded calls? The current patch might be faster, not sure. I've since changed it to absorb the CommitRow call, so I think it will be hard to forget :).
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → aosmond
Assignee | ||
Comment 4•6 years ago
|
||
Attachment #8987071 -
Attachment is obsolete: true
Attachment #8991012 -
Flags: review?(tnikkel)
Updated•6 years ago
|
Attachment #8991012 -
Flags: review?(tnikkel) → review+
Pushed by aosmond@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/853cf14dc462 JPEG decoder should post an invalidation for each row. r=tnikkel
Comment 6•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/853cf14dc462
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Updated•6 years ago
|
status-firefox62:
affected → ---
Updated•2 years ago
|
Performance Impact: --- → P3
Whiteboard: [gfx-noted] [qf:p3:f64] → [gfx-noted]
You need to log in
before you can comment on or make changes to this bug.
Description
•