Bug 36096 - [Qt] Do not use QBuffer in ImageDecoderQt.cpp
Summary: [Qt] Do not use QBuffer in ImageDecoderQt.cpp
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P3 Enhancement
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on: 50082
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-14 05:28 PDT by Holger Freyther
Modified: 2014-02-03 03:16 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Freyther 2010-03-14 05:28:37 PDT
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.
Comment 1 Markus Goetz 2010-04-08 08:04:02 PDT
Related read:
http://bugreports.qt.nokia.com/browse/QTBUG-9095
Comment 2 Markus Goetz 2011-04-14 04:28:14 PDT
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).
Comment 3 Jocelyn Turcotte 2014-02-03 03:16:17 PST
=== 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.