| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
| 3 * Copyright (C) 2008-2009 Torch Mobile, Inc. | 3 * Copyright (C) 2008-2009 Torch Mobile, Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #ifndef JPEGImageDecoder_h | 27 #ifndef JPEGImageDecoder_h |
| 28 #define JPEGImageDecoder_h | 28 #define JPEGImageDecoder_h |
| 29 | 29 |
| 30 #include "platform/image-decoders/ImageDecoder.h" | 30 #include "platform/image-decoders/ImageDecoder.h" |
| 31 | 31 |
| 32 #include "wtf/Noncopyable.h" | 32 #include "wtf/Noncopyable.h" |
| 33 #include "wtf/OwnPtr.h" | 33 #include "wtf/OwnPtr.h" |
| 34 | 34 |
| 35 namespace WebCore { | 35 namespace blink { |
| 36 | 36 |
| 37 class JPEGImageReader; | 37 class JPEGImageReader; |
| 38 | 38 |
| 39 // This class decodes the JPEG image format. | 39 // This class decodes the JPEG image format. |
| 40 class PLATFORM_EXPORT JPEGImageDecoder : public ImageDecoder { | 40 class PLATFORM_EXPORT JPEGImageDecoder : public ImageDecoder { |
| 41 WTF_MAKE_NONCOPYABLE(JPEGImageDecoder); | 41 WTF_MAKE_NONCOPYABLE(JPEGImageDecoder); |
| 42 public: | 42 public: |
| 43 JPEGImageDecoder(ImageSource::AlphaOption, ImageSource::GammaAndColorProfile
Option, size_t maxDecodedBytes); | 43 JPEGImageDecoder(ImageSource::AlphaOption, ImageSource::GammaAndColorProfile
Option, size_t maxDecodedBytes); |
| 44 virtual ~JPEGImageDecoder(); | 44 virtual ~JPEGImageDecoder(); |
| 45 | 45 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 67 // Decodes the image. If |onlySize| is true, stops decoding after | 67 // Decodes the image. If |onlySize| is true, stops decoding after |
| 68 // calculating the image size. If decoding fails but there is no more | 68 // calculating the image size. If decoding fails but there is no more |
| 69 // data coming, sets the "decode failure" flag. | 69 // data coming, sets the "decode failure" flag. |
| 70 void decode(bool onlySize); | 70 void decode(bool onlySize); |
| 71 | 71 |
| 72 OwnPtr<JPEGImageReader> m_reader; | 72 OwnPtr<JPEGImageReader> m_reader; |
| 73 IntSize m_decodedSize; | 73 IntSize m_decodedSize; |
| 74 bool m_hasColorProfile; | 74 bool m_hasColorProfile; |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace WebCore | 77 } // namespace blink |
| 78 | 78 |
| 79 #endif | 79 #endif |
| OLD | NEW |