[Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder
[WebKit-https.git] / Source / WebCore / platform / image-decoders / ImageDecoder.cpp
old mode 100644 (file)
new mode 100755 (executable)
index d9e9690..3da6c42
  */
 
 #include "config.h"
-
 #include "ImageDecoder.h"
 
-#include <algorithm>
-#include <cmath>
-
 #include "BMPImageDecoder.h"
 #include "GIFImageDecoder.h"
 #include "ICOImageDecoder.h"
+#if PLATFORM(QT)
+#include "ImageDecoderQt.h"
+#endif
 #include "JPEGImageDecoder.h"
 #include "PNGImageDecoder.h"
+#include "SharedBuffer.h"
 #if USE(WEBP)
 #include "WEBPImageDecoder.h"
 #endif
-#include "SharedBuffer.h"
+
+#include <algorithm>
+#include <cmath>
 
 using namespace std;
 
@@ -124,6 +126,9 @@ ImageDecoder* ImageDecoder::create(const SharedBuffer& data, ImageSource::AlphaO
     if (matchesICOSignature(contents) || matchesCURSignature(contents))
         return new ICOImageDecoder(alphaOption, gammaAndColorProfileOption);
 
+#if PLATFORM(QT)
+    return new ImageDecoderQt(alphaOption, gammaAndColorProfileOption);
+#endif
     return 0;
 }