summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-11 17:28:35 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-11 17:28:35 (GMT)
commitf4053c19b3e5584f97cfb0eb14d4b488259291b4 (patch)
treee1c66f8dee64bc102d8eaaef78ccd911becf507d
parent655a79094749f13f4b72d94a7b768ac89d21c7f4 (diff)
parent37353a95fd11ec03ccde5c4e85ef2f0a605b85db (diff)
downloadQt-f4053c19b3e5584f97cfb0eb14d4b488259291b4.zip
Qt-f4053c19b3e5584f97cfb0eb14d4b488259291b4.tar.gz
Qt-f4053c19b3e5584f97cfb0eb14d4b488259291b4.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 266a6c4f1938dd9edf4a8125faf91c62495e3ce2 ) Doc: Removed lie that access to QBuffer is unbuffered. Minisplitter doesn't paint to the bottom/right Avoid unnecessary memory allocation in the jpeg handler's image detection
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog13
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp2
-rw-r--r--src/corelib/io/qiodevice.cpp3
-rw-r--r--src/gui/kernel/qwidget_mac.mm6
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler.cpp6
6 files changed, 25 insertions, 7 deletions
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 6a2e75f..a2d5f37 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -8,4 +8,4 @@ The commit imported was from the
and has the sha1 checksum
- f3110d2f94c825477afac054ed448e45d47f5670
+ 266a6c4f1938dd9edf4a8125faf91c62495e3ce2
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 61c2227..a3f70d3 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-03-11 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Avoid double-buffering with Qt image decoders
+
+ Pass QIODevice::Unbuffered when opening the QBuffer that
+ wraps the image data, to hint to Qt that no extra buffering
+ is needed.
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::setData):
+
2010-01-14 Diego Gonzalez <diego.gonzalez@openbossa.org>
Reviewed by Kenneth Christiansen.
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
index b6823dd..9bcb3e9 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
@@ -79,7 +79,7 @@ void ImageDecoderQt::setData(SharedBuffer* data, bool allDataReceived)
QByteArray imageData = QByteArray::fromRawData(m_data->data(), m_data->size());
m_buffer = new QBuffer;
m_buffer->setData(imageData);
- m_buffer->open(QBuffer::ReadOnly);
+ m_buffer->open(QBuffer::ReadOnly | QIODevice::Unbuffered);
m_reader = new QImageReader(m_buffer, m_format);
}
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 662100a..c93f0c3 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -282,8 +282,7 @@ QIODevicePrivate::~QIODevicePrivate()
Certain flags, such as \c Unbuffered and \c Truncate, are
meaningless when used with some subclasses. Some of these
restrictions are implied by the type of device that is represented
- by a subclass; for example, access to a QBuffer is always
- unbuffered. In other cases, the restriction may be due to the
+ by a subclass. In other cases, the restriction may be due to the
implementation, or may be imposed by the underlying platform; for
example, QTcpSocket does not support \c Unbuffered mode, and
limitations in the native API prevent QFile from supporting \c
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 5bce17f..bee93b5 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -4682,8 +4682,10 @@ void QWidgetPrivate::syncCocoaMask()
if (!q->testAttribute(Qt::WA_WState_Created) || !extra)
return;
- if (extra->hasMask && extra->maskBits.size() != q->size()) {
- extra->maskBits = QImage(q->size(), QImage::Format_Mono);
+ if (extra->hasMask) {
+ if(extra->maskBits.size() != q->size()) {
+ extra->maskBits = QImage(q->size(), QImage::Format_Mono);
+ }
extra->maskBits.fill(QColor(Qt::color1).rgba());
extra->maskBits.setNumColors(2);
extra->maskBits.setColor(0, QColor(Qt::color0).rgba());
diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
index 6cb93ad..98bd88f 100644
--- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp
+++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
@@ -1188,7 +1188,11 @@ bool QJpegHandler::canRead(QIODevice *device)
return false;
}
- return device->peek(2) == "\xFF\xD8";
+ char buffer[2];
+ if (device->peek(buffer, 2) != 2)
+ return false;
+
+ return uchar(buffer[0]) == 0xff && uchar(buffer[1]) == 0xd8;
}
bool QJpegHandler::read(QImage *image)