Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. |
| 4 * Copyright (C) 2008-2009 Torch Mobile, Inc. | 4 * Copyright (C) 2008-2009 Torch Mobile, Inc. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 #ifndef BitmapImage_h | 28 #ifndef BitmapImage_h |
| 29 #define BitmapImage_h | 29 #define BitmapImage_h |
| 30 | 30 |
| 31 #include "platform/geometry/IntSize.h" | 31 #include "platform/geometry/IntSize.h" |
| 32 #include "platform/graphics/Color.h" | 32 #include "platform/graphics/Color.h" |
| 33 #include "platform/graphics/FrameData.h" | 33 #include "platform/graphics/FrameData.h" |
| 34 #include "platform/graphics/Image.h" | 34 #include "platform/graphics/Image.h" |
| 35 #include "platform/graphics/ImageAnimationPolicy.h" | 35 #include "platform/graphics/ImageAnimationPolicy.h" |
| 36 #include "platform/graphics/ImageOrientation.h" | 36 #include "platform/graphics/ImageOrientation.h" |
| 37 #include "platform/graphics/ImageSource.h" | 37 #include "platform/graphics/ImageSource.h" |
| 38 #include "platform/image-decoders/ImageDecoder.h" | |
|
Stephen White
2015/03/13 19:33:31
I assume this is for the repetition count enum?
R
| |
| 38 #include "wtf/Forward.h" | 39 #include "wtf/Forward.h" |
| 39 | 40 |
| 40 namespace blink { | 41 namespace blink { |
| 41 | 42 |
| 42 class NativeImageSkia; | 43 class NativeImageSkia; |
| 43 template <typename T> class Timer; | 44 template <typename T> class Timer; |
| 44 | 45 |
| 45 class PLATFORM_EXPORT BitmapImage : public Image { | 46 class PLATFORM_EXPORT BitmapImage : public Image { |
| 46 friend class GeneratedImage; | 47 friend class GeneratedImage; |
| 47 friend class CrossfadeGeneratedImage; | 48 friend class CrossfadeGeneratedImage; |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 65 virtual bool currentFrameHasSingleSecurityOrigin() const override; | 66 virtual bool currentFrameHasSingleSecurityOrigin() const override; |
| 66 | 67 |
| 67 virtual IntSize size() const override; | 68 virtual IntSize size() const override; |
| 68 IntSize sizeRespectingOrientation() const; | 69 IntSize sizeRespectingOrientation() const; |
| 69 virtual bool getHotSpot(IntPoint&) const override; | 70 virtual bool getHotSpot(IntPoint&) const override; |
| 70 virtual String filenameExtension() const override; | 71 virtual String filenameExtension() const override; |
| 71 virtual bool dataChanged(bool allDataReceived) override; | 72 virtual bool dataChanged(bool allDataReceived) override; |
| 72 | 73 |
| 73 bool isAllDataReceived() const { return m_allDataReceived; } | 74 bool isAllDataReceived() const { return m_allDataReceived; } |
| 74 bool hasColorProfile() const; | 75 bool hasColorProfile() const; |
| 75 void resetDecoder(); | |
| 76 | 76 |
| 77 // It may look unusual that there's no start animation call as public API. | 77 // It may look unusual that there's no start animation call as public API. |
| 78 // This because we start and stop animating lazily. Animation starts when | 78 // This because we start and stop animating lazily. Animation starts when |
| 79 // the image is rendered, and automatically pauses once all observers no | 79 // the image is rendered, and automatically pauses once all observers no |
| 80 // longer want to render the image. | 80 // longer want to render the image. |
| 81 virtual void stopAnimation() override; | 81 virtual void stopAnimation() override; |
| 82 virtual void resetAnimation() override; | 82 virtual void resetAnimation() override; |
| 83 virtual bool maybeAnimated() override; | 83 virtual bool maybeAnimated() override; |
| 84 | 84 |
| 85 virtual void setAnimationPolicy(ImageAnimationPolicy policy) override { m_an imationPolicy = policy; } | 85 virtual void setAnimationPolicy(ImageAnimationPolicy policy) override { m_an imationPolicy = policy; } |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 197 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi rst image frame yet from ImageIO. | 197 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi rst image frame yet from ImageIO. |
| 198 mutable bool m_hasUniformFrameSize : 1; | 198 mutable bool m_hasUniformFrameSize : 1; |
| 199 mutable bool m_haveFrameCount : 1; | 199 mutable bool m_haveFrameCount : 1; |
| 200 }; | 200 }; |
| 201 | 201 |
| 202 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); | 202 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); |
| 203 | 203 |
| 204 } // namespace blink | 204 } // namespace blink |
| 205 | 205 |
| 206 #endif | 206 #endif |
| OLD | NEW |