[Qt] Allow to use WebCore imagedecoders
authorzoltan@webkit.org <zoltan@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 14:48:55 +0000 (14:48 +0000)
committerzoltan@webkit.org <zoltan@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 14:48:55 +0000 (14:48 +0000)
commitf7e554953b57cb51952bc87f0080d159069a58d7
tree672e21a5c6fb70e95198865debb3c72bfa1d9d57
parent5fe373078a36d76f0dc7b2a687566ad9305dc3c7
[Qt] Allow to use WebCore imagedecoders
https://bugs.webkit.org/show_bug.cgi?id=32410

Source/WebCore:

Add ENABLE(QT_IMAGE_DECODER) guards around Qt imagedecoders and set it to default.
By passing ENABLE_QT_IMAGE_DECODER=0 define to the build system, WebKit will build
with WebCore's imagedecoders.

I added NO_RETURN attribute and PLATFORM(QT) conditionals to 2 functions of PNG and
JPEG decoders to avoid compiler warnings because in Qt-port we treat warning as errors (-Werror).

I'm continuing the refactoring of this area and try to use Qt imagedecoders only in
cases when WebCore doesn't support the image format.

Reviewed by Simon Hausmann.

No behavior change, no need new tests.

* Target.pri:
* WebCore.pri:
* platform/MIMETypeRegistry.cpp:
(WebCore::initializeSupportedImageMIMETypes):
(WebCore::initializeSupportedImageMIMETypesForEncoding):
* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageFrame::getAddr):
(ImageFrame):
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
NO_RETURN has been added to a function to avoid warning message.
* platform/image-decoders/png/PNGImageDecoder.cpp:
NO_RETURN has been added to a function to avoid warning message.
(WebCore):
* platform/image-decoders/qt/ImageFrameQt.cpp:
(WebCore):
(WebCore::ImageFrame::asNewNativeImage):

Tools:

Add ENABLE_QT_IMAGE_DECODER macro, it's enabled by default.

Reviewed by Simon Hausmann.

* qmake/mkspecs/features/features.prf:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@108792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Target.pri
Source/WebCore/WebCore.pri
Source/WebCore/platform/MIMETypeRegistry.cpp
Source/WebCore/platform/image-decoders/ImageDecoder.cpp
Source/WebCore/platform/image-decoders/ImageDecoder.h
Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
Source/WebCore/platform/image-decoders/qt/ImageFrameQt.cpp
Tools/ChangeLog
Tools/qmake/mkspecs/features/features.prf