| Index: Source/platform/image-decoders/png/PNGImageDecoder.h
|
| diff --git a/Source/core/platform/image-decoders/png/PNGImageDecoder.h b/Source/platform/image-decoders/png/PNGImageDecoder.h
|
| similarity index 51%
|
| rename from Source/core/platform/image-decoders/png/PNGImageDecoder.h
|
| rename to Source/platform/image-decoders/png/PNGImageDecoder.h
|
| index ca09b6d2a442119d4fb81e47451b271cd57ff1b4..4437634f9a937be6aeb437b11e7404b49f1725b0 100644
|
| --- a/Source/core/platform/image-decoders/png/PNGImageDecoder.h
|
| +++ b/Source/platform/image-decoders/png/PNGImageDecoder.h
|
| @@ -26,47 +26,49 @@
|
| #ifndef PNGImageDecoder_h
|
| #define PNGImageDecoder_h
|
|
|
| -#include "core/platform/image-decoders/ImageDecoder.h"
|
| +#include "platform/image-decoders/ImageDecoder.h"
|
| +#include "wtf/Noncopyable.h"
|
| #include "wtf/OwnPtr.h"
|
|
|
| namespace WebCore {
|
|
|
| - class PNGImageReader;
|
| +class PNGImageReader;
|
|
|
| - // This class decodes the PNG image format.
|
| - class PNGImageDecoder : public ImageDecoder {
|
| - public:
|
| - PNGImageDecoder(ImageSource::AlphaOption, ImageSource::GammaAndColorProfileOption, size_t maxDecodedBytes);
|
| - virtual ~PNGImageDecoder();
|
| +// This class decodes the PNG image format.
|
| +class PLATFORM_EXPORT PNGImageDecoder : public ImageDecoder {
|
| + WTF_MAKE_NONCOPYABLE(PNGImageDecoder);
|
| +public:
|
| + PNGImageDecoder(ImageSource::AlphaOption, ImageSource::GammaAndColorProfileOption, size_t maxDecodedBytes);
|
| + virtual ~PNGImageDecoder();
|
|
|
| - // ImageDecoder
|
| - virtual String filenameExtension() const { return "png"; }
|
| - virtual bool isSizeAvailable();
|
| - virtual ImageFrame* frameBufferAtIndex(size_t);
|
| - // CAUTION: setFailed() deletes |m_reader|. Be careful to avoid
|
| - // accessing deleted memory, especially when calling this from inside
|
| - // PNGImageReader!
|
| - virtual bool setFailed();
|
| + // ImageDecoder
|
| + virtual String filenameExtension() const { return "png"; }
|
| + virtual bool isSizeAvailable();
|
| + virtual ImageFrame* frameBufferAtIndex(size_t);
|
| + // CAUTION: setFailed() deletes |m_reader|. Be careful to avoid
|
| + // accessing deleted memory, especially when calling this from inside
|
| + // PNGImageReader!
|
| + virtual bool setFailed();
|
|
|
| - // Callbacks from libpng
|
| - void headerAvailable();
|
| - void rowAvailable(unsigned char* rowBuffer, unsigned rowIndex, int interlacePass);
|
| - void pngComplete();
|
| + // Callbacks from libpng
|
| + void headerAvailable();
|
| + void rowAvailable(unsigned char* rowBuffer, unsigned rowIndex, int interlacePass);
|
| + void pngComplete();
|
|
|
| - bool isComplete() const
|
| - {
|
| - return !m_frameBufferCache.isEmpty() && (m_frameBufferCache.first().status() == ImageFrame::FrameComplete);
|
| - }
|
| + bool isComplete() const
|
| + {
|
| + return !m_frameBufferCache.isEmpty() && (m_frameBufferCache.first().status() == ImageFrame::FrameComplete);
|
| + }
|
|
|
| - private:
|
| - // Decodes the image. If |onlySize| is true, stops decoding after
|
| - // calculating the image size. If decoding fails but there is no more
|
| - // data coming, sets the "decode failure" flag.
|
| - void decode(bool onlySize);
|
| +private:
|
| + // Decodes the image. If |onlySize| is true, stops decoding after
|
| + // calculating the image size. If decoding fails but there is no more
|
| + // data coming, sets the "decode failure" flag.
|
| + void decode(bool onlySize);
|
|
|
| - OwnPtr<PNGImageReader> m_reader;
|
| - bool m_doNothingOnFailure;
|
| - };
|
| + OwnPtr<PNGImageReader> m_reader;
|
| + bool m_doNothingOnFailure;
|
| +};
|
|
|
| } // namespace WebCore
|
|
|
|
|