[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:10 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 2126b9e6a1a073db4bbb6d3cf74497d9d2d7cd7f
Author: hausmann at webkit.org <hausmann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 6 13:46:14 2009 +0000

    [Qt] Remove dead code from ImageDecoderQt.
    
    https://bugs.webkit.org/show_bug.cgi?id=27538
    
    Remove unused variables and debugging code. The debug
    code has never been used and does not provide anything
    useful.
    
    * platform/graphics/qt/ImageDecoderQt.cpp:
    (WebCore::ImageDecoderQt::ReadContext::read):
    (WebCore::ImageDecoderQt::ReadContext::readImageLines):
    (WebCore::ImageDecoderQt::setData):
    (WebCore::ImageDecoderQt::isSizeAvailable):
    (WebCore::ImageDecoderQt::frameCount):
    (WebCore::ImageDecoderQt::repetitionCount):
    (WebCore::ImageDecoderQt::filenameExtension):
    (WebCore::ImageDecoderQt::imageAtIndex):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49179 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index bc61960..ad737ca 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2009-10-04  Holger Hans Peter Freyther  <zecke at selfish.org>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Remove dead code from ImageDecoderQt
+        https://bugs.webkit.org/show_bug.cgi?id=27538
+
+        Remove unused variables and debugging code. The debug
+        code has never been used and does not provide anything
+        useful.
+
+        * platform/graphics/qt/ImageDecoderQt.cpp:
+        (WebCore::ImageDecoderQt::ReadContext::read):
+        (WebCore::ImageDecoderQt::ReadContext::readImageLines):
+        (WebCore::ImageDecoderQt::setData):
+        (WebCore::ImageDecoderQt::isSizeAvailable):
+        (WebCore::ImageDecoderQt::frameCount):
+        (WebCore::ImageDecoderQt::repetitionCount):
+        (WebCore::ImageDecoderQt::filenameExtension):
+        (WebCore::ImageDecoderQt::imageAtIndex):
+
 2009-10-06  Philippe Normand  <pnormand at igalia.com>
 
         Reviewed by Xan Lopez.
diff --git a/WebCore/platform/graphics/qt/ImageDecoderQt.cpp b/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
index 8851984..1bd81bb 100644
--- a/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
+++ b/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
@@ -35,11 +35,6 @@
 #include <QtGui/QImageReader>
 #include <qdebug.h>
 
-namespace {
-    const  QImage::Format DesiredFormat = QImage::Format_ARGB32;
-    const  bool debugImageDecoderQt = false;
-}
-
 namespace WebCore {
 
 ImageDecoder* ImageDecoder::create(const SharedBuffer& data)
@@ -155,9 +150,6 @@ ImageDecoderQt::ReadContext::ReadResult
             m_size = m_target.back().m_image.size();
             const bool supportsAnimation = m_reader.supportsAnimation();
 
-            if (debugImageDecoderQt)
-                qDebug() << "readImage(): #" << m_target.size() << " complete, " << m_size
-                    << " format " << m_dataFormat <<  " supportsAnimation=" <<  supportsAnimation;
             // No point in readinfg further
             if (!supportsAnimation)
                 return ReadComplete;
@@ -183,9 +175,6 @@ ImageDecoderQt::ReadContext::IncrementalReadResult
         m_buffer.seek(startPos);
         const bool gotHeader = imageData.m_image.size().width();
 
-        if (debugImageDecoderQt)
-            qDebug() << "readImageLines(): read() failed: " << m_reader.errorString()
-                << " got header=" << gotHeader;
         // [Experimental] Did we manage to read the header?
         if (gotHeader) {
             imageData.m_imageState = ImageHeaderValid;
@@ -226,17 +215,11 @@ void ImageDecoderQt::setData(SharedBuffer* data, bool allDataReceived)
     reset();
     ReadContext readContext(data, ReadContext::LoadComplete, m_imageList);
 
-    if (debugImageDecoderQt)
-        qDebug() << " setData " << data->size() << " image bytes, complete=" << allDataReceived;
-
     const  ReadContext::ReadResult readResult =  readContext.read(allDataReceived);
 
     if (hasFirstImageHeader())
         m_hasAlphaChannel = m_imageList[0].m_image.hasAlphaChannel();
 
-    if (debugImageDecoderQt)
-        qDebug()  << " read returns " << readResult;
-
     switch (readResult) {
     case ReadContext::ReadFailed:
         m_failed = true;
@@ -263,22 +246,16 @@ void ImageDecoderQt::setData(SharedBuffer* data, bool allDataReceived)
 
 bool ImageDecoderQt::isSizeAvailable()
 {
-    if (debugImageDecoderQt)
-        qDebug() << " ImageDecoderQt::isSizeAvailable() returns" << ImageDecoder::isSizeAvailable();
     return ImageDecoder::isSizeAvailable();
 }
 
 size_t ImageDecoderQt::frameCount() const
 {
-    if (debugImageDecoderQt)
-        qDebug() << " ImageDecoderQt::frameCount() returns" << m_imageList.size();
     return m_imageList.size();
 }
 
 int ImageDecoderQt::repetitionCount() const
 {
-    if (debugImageDecoderQt)
-        qDebug() << " ImageDecoderQt::repetitionCount() returns" << m_loopCount;
     return m_loopCount;
 }
 
@@ -296,8 +273,6 @@ int ImageDecoderQt::duration(size_t index) const
 
 String ImageDecoderQt::filenameExtension() const
 {
-    if (debugImageDecoderQt)
-           qDebug() << " ImageDecoderQt::filenameExtension() returns" << m_imageFormat;
     return m_imageFormat;
 };
 
@@ -309,9 +284,6 @@ RGBA32Buffer* ImageDecoderQt::frameBufferAtIndex(size_t)
 
 QPixmap* ImageDecoderQt::imageAtIndex(size_t index) const
 {
-    if (debugImageDecoderQt)
-        qDebug() << "ImageDecoderQt::imageAtIndex(" << index << ')';
-
     if (index >= static_cast<size_t>(m_imageList.size()))
         return 0;
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list