[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
hausmann at webkit.org
hausmann at webkit.org
Thu Oct 29 20:40:13 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit c2a56dcee285b966e461b1f8d301e83a9d1d8306
Author: hausmann at webkit.org <hausmann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Oct 6 13:46:51 2009 +0000
[Qt] ImageDecoderQt avoid QString creation.
https://bugs.webkit.org/show_bug.cgi?id=27538
Avoid going from CString to QString to String
and go directly from CString to String. Also
avoid going to lower case to avoid an extra
memory allocation.
* platform/graphics/qt/ImageDecoderQt.cpp:
(WebCore::ImageDecoder::create):
(WebCore::ImageDecoderQt::ImageDecoderQt):
* platform/graphics/qt/ImageDecoderQt.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 744698c..32c0d40 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,23 @@
Reviewed by Simon Hausmann.
+ [Qt] ImageDecoderQt avoid QString creation.
+ https://bugs.webkit.org/show_bug.cgi?id=27538
+
+ Avoid going from CString to QString to String
+ and go directly from CString to String. Also
+ avoid going to lower case to avoid an extra
+ memory allocation.
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoder::create):
+ (WebCore::ImageDecoderQt::ImageDecoderQt):
+ * platform/graphics/qt/ImageDecoderQt.h:
+
+2009-10-05 Holger Hans Peter Freyther <zecke at selfish.org>
+
+ Reviewed by Simon Hausmann.
+
[Qt] Cleanup the ImageDecoder of Qt.
https://bugs.webkit.org/show_bug.cgi?id=27538
diff --git a/WebCore/platform/graphics/qt/ImageDecoderQt.cpp b/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
index cfa243f..ab9beb1 100644
--- a/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
+++ b/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
@@ -48,7 +48,7 @@ ImageDecoder* ImageDecoder::create(const SharedBuffer& data)
if (!buffer.open(QBuffer::ReadOnly))
return 0;
- QString imageFormat = QString::fromLatin1(QImageReader::imageFormat(&buffer).toLower());
+ QByteArray imageFormat = QImageReader::imageFormat(&buffer);
if (imageFormat.isEmpty())
return 0; // Image format not supported
@@ -164,9 +164,9 @@ ImageDecoderQt::ReadContext::IncrementalReadResult
return IncrementalReadComplete;
}
-ImageDecoderQt::ImageDecoderQt(const QString& imageFormat)
+ImageDecoderQt::ImageDecoderQt(const QByteArray& imageFormat)
: m_hasAlphaChannel(false)
- , m_imageFormat(imageFormat)
+ , m_imageFormat(imageFormat.constData())
{
}
diff --git a/WebCore/platform/graphics/qt/ImageDecoderQt.h b/WebCore/platform/graphics/qt/ImageDecoderQt.h
index e6471fa..d73a618 100644
--- a/WebCore/platform/graphics/qt/ImageDecoderQt.h
+++ b/WebCore/platform/graphics/qt/ImageDecoderQt.h
@@ -39,7 +39,7 @@ namespace WebCore {
class ImageDecoderQt : public ImageDecoder
{
public:
- ImageDecoderQt(const QString& imageFormat);
+ ImageDecoderQt(const QByteArray& imageFormat);
~ImageDecoderQt();
virtual void setData(SharedBuffer* data, bool allDataReceived);
@@ -75,7 +75,7 @@ private:
mutable ImageList m_imageList;
mutable QHash<int, QPixmap> m_pixmapCache;
int m_loopCount;
- QString m_imageFormat;
+ String m_imageFormat;
};
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list