Bug 104302
Summary: | JPEGImageDecoder should use SharedBuffer::getSomeData() instead of data() | ||
---|---|---|---|
Product: | WebKit | Reporter: | Hin-Chung Lam <hclam> |
Component: | Images | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | enne, jamesr, nduca, noel.gordon, pkasting, qinmin, senorblanco |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Hin-Chung Lam
JPEGImageDecoder calls data() to consolidate the entire buffer into one piece. This involves memcpys and can possibly avoided by using getSomeData().
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
noel gordon
Noticed in the animated webp patch bug 113124, that a member variable m_demux (a webp demux object needed for decoding) is used to read the SharedBuffer::data().
The m_demux object internally maintains pointers into that data().
That's probably ok for a single pass through decode(). However, for progessive decoding of large webp images, decode() is called multiple times. Any new calls SharedBuffer::data() in any decode() might cause that data() to be consolidated if I'm reading this bug correctly?