| Index: Source/platform/image-decoders/jpeg/JPEGImageDecoder.h
|
| diff --git a/Source/core/platform/image-decoders/jpeg/JPEGImageDecoder.h b/Source/platform/image-decoders/jpeg/JPEGImageDecoder.h
|
| similarity index 52%
|
| rename from Source/core/platform/image-decoders/jpeg/JPEGImageDecoder.h
|
| rename to Source/platform/image-decoders/jpeg/JPEGImageDecoder.h
|
| index 3c603c0258a7561d31f37ec030bb98acdd82bf77..090d69d890a5e30624928ac13d51ef86849a433d 100644
|
| --- a/Source/core/platform/image-decoders/jpeg/JPEGImageDecoder.h
|
| +++ b/Source/platform/image-decoders/jpeg/JPEGImageDecoder.h
|
| @@ -27,45 +27,47 @@
|
| #ifndef JPEGImageDecoder_h
|
| #define JPEGImageDecoder_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 JPEGImageReader;
|
| +class JPEGImageReader;
|
|
|
| - // This class decodes the JPEG image format.
|
| - class JPEGImageDecoder : public ImageDecoder {
|
| - public:
|
| - JPEGImageDecoder(ImageSource::AlphaOption, ImageSource::GammaAndColorProfileOption, size_t maxDecodedBytes);
|
| - virtual ~JPEGImageDecoder();
|
| +// This class decodes the JPEG image format.
|
| +class PLATFORM_EXPORT JPEGImageDecoder : public ImageDecoder {
|
| + WTF_MAKE_NONCOPYABLE(JPEGImageDecoder);
|
| +public:
|
| + JPEGImageDecoder(ImageSource::AlphaOption, ImageSource::GammaAndColorProfileOption, size_t maxDecodedBytes);
|
| + virtual ~JPEGImageDecoder();
|
|
|
| - // ImageDecoder
|
| - virtual String filenameExtension() const OVERRIDE { return "jpg"; }
|
| - virtual bool isSizeAvailable() OVERRIDE;
|
| - virtual IntSize decodedSize() const OVERRIDE { return m_decodedSize; }
|
| - virtual bool setSize(unsigned width, unsigned height) OVERRIDE;
|
| - virtual ImageFrame* frameBufferAtIndex(size_t) OVERRIDE;
|
| - // CAUTION: setFailed() deletes |m_reader|. Be careful to avoid
|
| - // accessing deleted memory, especially when calling this from inside
|
| - // JPEGImageReader!
|
| - virtual bool setFailed() OVERRIDE;
|
| + // ImageDecoder
|
| + virtual String filenameExtension() const OVERRIDE { return "jpg"; }
|
| + virtual bool isSizeAvailable() OVERRIDE;
|
| + virtual IntSize decodedSize() const OVERRIDE { return m_decodedSize; }
|
| + virtual bool setSize(unsigned width, unsigned height) OVERRIDE;
|
| + virtual ImageFrame* frameBufferAtIndex(size_t) OVERRIDE;
|
| + // CAUTION: setFailed() deletes |m_reader|. Be careful to avoid
|
| + // accessing deleted memory, especially when calling this from inside
|
| + // JPEGImageReader!
|
| + virtual bool setFailed() OVERRIDE;
|
|
|
| - bool outputScanlines();
|
| - void jpegComplete();
|
| + bool outputScanlines();
|
| + void jpegComplete();
|
|
|
| - void setOrientation(ImageOrientation orientation) { m_orientation = orientation; }
|
| + void setOrientation(ImageOrientation orientation) { m_orientation = orientation; }
|
|
|
| - 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<JPEGImageReader> m_reader;
|
| - IntSize m_decodedSize;
|
| - };
|
| + OwnPtr<JPEGImageReader> m_reader;
|
| + IntSize m_decodedSize;
|
| +};
|
|
|
| } // namespace WebCore
|
|
|
|
|