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

Unified Diff: Source/platform/image-decoders/png/PNGImageDecoder.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/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
« no previous file with comments | « Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp ('k') | Source/platform/image-decoders/png/PNGImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698