Closed Bug 1284034 Opened 4 years ago Closed 3 years ago

Eliminate unnecessary copying between nsICODecoder's SourceBuffer and its contained decoder's SourceBuffer

Categories

(Core :: ImageLib, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1315554

People

(Reporter: seth, Unassigned)

References

Details

(Whiteboard: [gfx-noted])

We should figure out a way to eliminate the unnecessary copying between nsICODecoder's SourceBuffer and its contained decoder's SourceBuffer added in bug 1185799. It requires a little thought to design the API, but I'm pretty sure we can avoid it just by making it possible to make a SourceBufferIterator that points to only a subset of a SourceBuffer's range. Since we know the beginning and end of the region of the nsICODecoder's SourceBuffer that the contained decoder should have access to, we should be able to create such a SourceBufferIterator, allowing us to totally avoid any copies.

For that to work, though, we have to stop writing synthesized data into the contained decoders, which we unfortunately do right now. (We synthesize fake headers.) We'll need to solve that problem as well.
Whiteboard: [gfx-noted]
I fixed this as part of bug 1315554.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1315554
You need to log in before you can comment on or make changes to this bug.