Bug 36096
| Summary: | [Qt] Do not use QBuffer in ImageDecoderQt.cpp | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Holger Freyther <zecke> |
| Component: | Images | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Enhancement | CC: | cmarcelo, kent.hansen, markus, menard |
| Priority: | P3 | Keywords: | Qt, QtTriaged |
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | All | ||
| Bug Depends on: | 50082 | ||
| Bug Blocks: | |||
Holger Freyther
Recently WebCore::SharedBuffer was changed to work on segments. In our current ImageDecoderQt we are creating a QBuffer on top of the result of WebCore::SharedBuffer::data. The ::data method is now focred to create a linear buffer from the list of segments which will increase our memory usage.
We should build a QIODevice on top of the WebCore::SharedBuffer and we might be able to reuse the class we are using for Forms inside QNetworkReply.cpp... or at least this one is properly debugged and is known to work.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Markus Goetz
Related read:
http://bugreports.qt.nokia.com/browse/QTBUG-9095
Markus Goetz
It makes most sense to make this depend on 50082.
That way (in most cases) we can avoid having a QBuffer but directly wrap the QSharedPointer<char> into a custom QIODevice and we have only 1 memcpy (the one from the OS read() network syscall).
For the cases that the zerocopy in 50082 does not work we still have to use the QBuffer. (or a solution similar to what Holger suggested).
Jocelyn Turcotte
=== Bulk closing of Qt bugs ===
If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.
If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.