Closed Bug 1079628 Opened 10 years ago Closed 10 years ago

Record the number of bytes decoded on a per-decoder basis

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: seth, Assigned: seth)

References

Details

Attachments

(1 file, 1 obsolete file)

As a first step to supporting multiple decoders at once, we need to move RasterImage::mBytesDecoded into the Decoder class. This means that we'll now record it on a per-decoder basis.
Here's the patch.
Attachment #8501470 - Flags: review?(tnikkel)
Attachment #8501470 - Flags: review?(tnikkel) → review+
There was a simple bug that seems to have caused the oranges in the try job above: we weren't incrementing mBytesDecoded when the decoder had encountered an error, or when there was invalid data at the end of the source data. I've fixed this by moving the |mBytesDecoded += aCount| line higher in |Decoder::Write|, before any of the early returns. In local testing, this fixed the crashtest failures. (I haven't checked the reftests locally.)
Attachment #8501470 - Attachment is obsolete: true
Thanks for the review, Timothy!

Here's a new try job:

https://tbpl.mozilla.org/?tree=Try&rev=f8ebcb2cfb23
https://hg.mozilla.org/mozilla-central/rev/cbb710fac806
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.