Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1869)

Unified Diff: Source/platform/image-decoders/jpeg/JPEGImageDecoder.h

Issue 99103006: Moving GraphicsContext and dependencies from core to platform. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final patch - fixes Android Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « Source/platform/image-decoders/ico/ICOImageDecoder.cpp ('k') | Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698