[Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder
[WebKit-https.git] / Source / WebCore / platform / image-decoders / ImageDecoder.h
old mode 100644 (file)
new mode 100755 (executable)
index 20122ff..0c40fa6
@@ -40,9 +40,6 @@
 #if USE(SKIA)
 #include "NativeImageSkia.h"
 #include "SkColorPriv.h"
-#elif PLATFORM(QT)
-#include <QPixmap>
-#include <QImage>
 #endif
 
 namespace WebCore {
@@ -64,7 +61,7 @@ namespace WebCore {
             DisposeOverwritePrevious  // Clear frame to previous framebuffer
                                       // contents
         };
-#if USE(SKIA) || (PLATFORM(QT) && USE(QT_IMAGE_DECODER))
+#if USE(SKIA)
         typedef uint32_t PixelData;
 #else
         typedef unsigned PixelData;
@@ -140,19 +137,10 @@ namespace WebCore {
         {
 #if USE(SKIA)
             return m_bitmap.bitmap().getAddr32(x, y);
-#elif PLATFORM(QT) && USE(QT_IMAGE_DECODER)
-            m_image = m_pixmap.toImage();
-            m_pixmap = QPixmap();
-            return reinterpret_cast_ptr<QRgb*>(m_image.scanLine(y)) + x;
 #else
             return m_bytes + (y * width()) + x;
 #endif
         }
-
-#if PLATFORM(QT) && USE(QT_IMAGE_DECODER)
-        void setPixmap(const QPixmap& pixmap);
-#endif
-
     private:
 #if USE(CG)
         typedef RetainPtr<CFMutableDataRef> NativeBackingStore;
@@ -190,11 +178,6 @@ namespace WebCore {
 #if PLATFORM(CHROMIUM) && OS(DARWIN)
         ColorProfile m_colorProfile;
 #endif
-#elif PLATFORM(QT) && USE(QT_IMAGE_DECODER)
-        mutable QPixmap m_pixmap;
-        mutable QImage m_image;
-        bool m_hasAlpha;
-        IntSize m_size;
 #else
         NativeBackingStore m_backingStore;
         PixelData* m_bytes; // The memory is backed by m_backingStore.