| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #ifndef DeferredImageDecoder_h | 26 #ifndef DeferredImageDecoder_h |
| 27 #define DeferredImageDecoder_h | 27 #define DeferredImageDecoder_h |
| 28 | 28 |
| 29 #include "SkBitmap.h" | 29 #include "SkBitmap.h" |
| 30 #include "SkPixelRef.h" | 30 #include "SkPixelRef.h" |
| 31 #include "platform/PlatformExport.h" | 31 #include "platform/PlatformExport.h" |
| 32 #include "platform/geometry/IntSize.h" | 32 #include "platform/geometry/IntSize.h" |
| 33 #include "platform/graphics/FrameData.h" | 33 #include "platform/graphics/FrameData.h" |
| 34 #include "platform/graphics/ImageFrameGenerator.h" | 34 #include "platform/graphics/ImageFrameGenerator.h" |
| 35 #include "platform/image-decoders/ImageDecoder.h" | 35 #include "platform/image-decoders/ImageDecoder.h" |
| 36 #include "wtf/Allocator.h" |
| 36 #include "wtf/Forward.h" | 37 #include "wtf/Forward.h" |
| 37 #include "wtf/OwnPtr.h" | 38 #include "wtf/OwnPtr.h" |
| 38 #include "wtf/Vector.h" | 39 #include "wtf/Vector.h" |
| 39 | 40 |
| 40 class SkImage; | 41 class SkImage; |
| 41 | 42 |
| 42 namespace blink { | 43 namespace blink { |
| 43 | 44 |
| 44 class ImageFrameGenerator; | 45 class ImageFrameGenerator; |
| 45 class SharedBuffer; | 46 class SharedBuffer; |
| 46 | 47 |
| 47 class PLATFORM_EXPORT DeferredImageDecoder { | 48 class PLATFORM_EXPORT DeferredImageDecoder final { |
| 48 WTF_MAKE_NONCOPYABLE(DeferredImageDecoder); | 49 WTF_MAKE_NONCOPYABLE(DeferredImageDecoder); |
| 50 USING_FAST_MALLOC(DeferredImageDecoder); |
| 49 public: | 51 public: |
| 50 ~DeferredImageDecoder(); | 52 ~DeferredImageDecoder(); |
| 51 static PassOwnPtr<DeferredImageDecoder> create(const SharedBuffer& data, Ima
geDecoder::AlphaOption, ImageDecoder::GammaAndColorProfileOption); | 53 static PassOwnPtr<DeferredImageDecoder> create(const SharedBuffer& data, Ima
geDecoder::AlphaOption, ImageDecoder::GammaAndColorProfileOption); |
| 52 | 54 |
| 53 static PassOwnPtr<DeferredImageDecoder> createForTesting(PassOwnPtr<ImageDec
oder>); | 55 static PassOwnPtr<DeferredImageDecoder> createForTesting(PassOwnPtr<ImageDec
oder>); |
| 54 | 56 |
| 55 static void setEnabled(bool); | 57 static void setEnabled(bool); |
| 56 static bool enabled(); | 58 static bool enabled(); |
| 57 | 59 |
| 58 String filenameExtension() const; | 60 String filenameExtension() const; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // Carries only frame state and other information. Does not carry bitmap. | 99 // Carries only frame state and other information. Does not carry bitmap. |
| 98 Vector<FrameData> m_frameData; | 100 Vector<FrameData> m_frameData; |
| 99 RefPtr<ImageFrameGenerator> m_frameGenerator; | 101 RefPtr<ImageFrameGenerator> m_frameGenerator; |
| 100 | 102 |
| 101 static bool s_enabled; | 103 static bool s_enabled; |
| 102 }; | 104 }; |
| 103 | 105 |
| 104 } // namespace blink | 106 } // namespace blink |
| 105 | 107 |
| 106 #endif | 108 #endif |
| OLD | NEW |