• zoltan@webkit.org's avatar
    [Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder · 891b02a4
    zoltan@webkit.org authored
    This change modifies the default ImageDecoder for Qt-port from QImageDecoder to WebCore ImageDecoder.
    The new behavior is to use QImageDecoder only if WebCoreImageDecoder - and the platform - doesn't support
    the requested image type.
    The WTF_USE_QT_IMAGE_DECODER macro has been removed, since it is no longer needed.
    This change adds build depedency (except Qt-MAC and Qt-WIN platform) for libpng-dev and libjpeg-dev packages,
    because PNG and JPEG imagedecoders need not only these libraries, but their headers also. Qmake-config
    tests for these libraries were introduced in r110045.
    Notice: with using libjpeg-turbo as a system library I measured 10% performance improvement on Methanol benchmark
    (collection of popular sites, page-loading benchmark) with this patch.
    Reviewed by Simon Hausmann.
    No new tests needed.
    * Target.pri: Move WebCore ImageDecoder files out of guards. Remove ImageFrameQt.cpp from sources.
    * WebCore.pri: Move WebCore ImageDecoder include paths out of guards.
    * platform/MIMETypeRegistry.cpp:
    (WebCore::initializeSupportedImageMIMETypes): Add WebCore supported and Qt supported MIME types.
    (WebCore::initializeSupportedImageMIMETypesForEncoding): Use Qt supported MIME types.
    * platform/graphics/ImageSource.cpp: Remove unnecessary includes.
    * platform/graphics/ImageSource.h: Remove unnecessary typedefs.
    * platform/graphics/qt/ImageDecoderQt.cpp: Remove ImageDecoder::create, since it is no longer needed.
    (WebCore::ImageDecoderQt::filenameExtension): Remove unnecessary semicolon.
    (WebCore::ImageDecoderQt::internalHandleCurrentImage): Use QImage and ImageFrame instead of QPixmap.
    (WebCore::ImageFrame::asNewNativeImage): Moved here from removed ImageFrameQt.cpp.
    * platform/image-decoders/ImageDecoder.cpp: Reorganize the includes of the header.
    (WebCore::ImageDecoder::create): Add platform macro guarded fallback case for QImageDecoder. Add guards
    for JPEG, PNG, ICO decoder for Qt-MAC and Qt-WIN platform.
    * platform/image-decoders/ImageDecoder.h: Remove Qt-specific codes.
    (WebCore::ImageFrame::getAddr): Remove Qt-specific case, since it is no longer needed.
    * platform/image-decoders/qt/ImageFrameQt.cpp: Removed. Dead code, other code has been moved to
    Get rid of QT_IMAGE_DECODER flag.
    Reviewed by Simon Hausmann.
    * WebCoreSupport/AboutDataEnableFeatures.in:
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog 196 KB