diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.h')
-rw-r--r-- | Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.h | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.h b/Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.h index 38b8d1d7f..e282b2276 100644 --- a/Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.h +++ b/Source/WebCore/platform/image-decoders/webp/WEBPImageDecoder.h @@ -10,7 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * 3. Neither the name of Apple Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * @@ -26,53 +26,35 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WEBPImageDecoder_h -#define WEBPImageDecoder_h +#pragma once #include "ImageDecoder.h" #if USE(WEBP) #include "webp/decode.h" -#if USE(QCMSLIB) && (WEBP_DECODER_ABI_VERSION > 0x200) -#define QCMS_WEBP_COLOR_CORRECTION -#endif namespace WebCore { -class WEBPImageDecoder : public ImageDecoder { +class WEBPImageDecoder final : public ImageDecoder { public: - WEBPImageDecoder(ImageSource::AlphaOption, ImageSource::GammaAndColorProfileOption); + WEBPImageDecoder(AlphaOption, GammaAndColorProfileOption); virtual ~WEBPImageDecoder(); - virtual String filenameExtension() const { return "webp"; } - virtual bool isSizeAvailable(); - virtual ImageFrame* frameBufferAtIndex(size_t index); + String filenameExtension() const override { return "webp"; } + bool isSizeAvailable() override; + ImageFrame* frameBufferAtIndex(size_t index) override; private: bool decode(bool onlySize); WebPIDecoder* m_decoder; bool m_hasAlpha; - int m_formatFlags; - -#ifdef QCMS_WEBP_COLOR_CORRECTION - qcms_transform* colorTransform() const { return m_transform; } - void createColorTransform(const char* data, size_t); - void readColorProfile(const uint8_t* data, size_t); - void applyColorProfile(const uint8_t* data, size_t, ImageFrame&); - bool m_haveReadProfile; - qcms_transform* m_transform; - int m_decodedHeight; -#else void applyColorProfile(const uint8_t*, size_t, ImageFrame&) { }; -#endif void clear(); }; } // namespace WebCore #endif - -#endif |