| 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 23 matching lines...) Expand all Loading... |
| 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/ImageAnimation.h" | 38 #include "platform/image-decoders/ImageAnimation.h" |
| 39 #include "wtf/Forward.h" | 39 #include "wtf/Forward.h" |
| 40 #include "wtf/OwnPtr.h" | 40 #include "wtf/OwnPtr.h" |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 class ColorSpaceProfile; |
| 45 |
| 44 template <typename T> class Timer; | 46 template <typename T> class Timer; |
| 45 | 47 |
| 46 class PLATFORM_EXPORT BitmapImage final : public Image { | 48 class PLATFORM_EXPORT BitmapImage final : public Image { |
| 47 friend class GeneratedImage; | 49 friend class GeneratedImage; |
| 48 friend class CrossfadeGeneratedImage; | 50 friend class CrossfadeGeneratedImage; |
| 49 friend class GradientGeneratedImage; | 51 friend class GradientGeneratedImage; |
| 50 friend class GraphicsContext; | 52 friend class GraphicsContext; |
| 51 public: | 53 public: |
| 52 static PassRefPtr<BitmapImage> create(ImageObserver* observer = 0) | 54 static PassRefPtr<BitmapImage> create(ImageObserver* observer = 0) |
| 53 { | 55 { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 64 bool currentFrameHasSingleSecurityOrigin() const override; | 66 bool currentFrameHasSingleSecurityOrigin() const override; |
| 65 | 67 |
| 66 IntSize size() const override; | 68 IntSize size() const override; |
| 67 IntSize sizeRespectingOrientation() const; | 69 IntSize sizeRespectingOrientation() const; |
| 68 bool getHotSpot(IntPoint&) const override; | 70 bool getHotSpot(IntPoint&) const override; |
| 69 String filenameExtension() const override; | 71 String filenameExtension() const override; |
| 70 bool dataChanged(bool allDataReceived) override; | 72 bool dataChanged(bool allDataReceived) override; |
| 71 | 73 |
| 72 bool isAllDataReceived() const { return m_allDataReceived; } | 74 bool isAllDataReceived() const { return m_allDataReceived; } |
| 73 bool hasColorProfile() const; | 75 bool hasColorProfile() const; |
| 76 PassRefPtr<ColorSpaceProfile> colorProfile() const { return m_source.colorPr
ofile(); } |
| 77 void notifyDeviceProfile(ColorSpaceProfile*); |
| 78 bool resetDecoder(ColorSpaceProfile*); |
| 74 | 79 |
| 75 // It may look unusual that there's no start animation call as public API. | 80 // It may look unusual that there's no start animation call as public API. |
| 76 // This because we start and stop animating lazily. Animation starts when | 81 // This because we start and stop animating lazily. Animation starts when |
| 77 // the image is rendered, and automatically pauses once all observers no | 82 // the image is rendered, and automatically pauses once all observers no |
| 78 // longer want to render the image. | 83 // longer want to render the image. |
| 79 void stopAnimation() override; | 84 void stopAnimation() override; |
| 80 void resetAnimation() override; | 85 void resetAnimation() override; |
| 81 bool maybeAnimated() override; | 86 bool maybeAnimated() override; |
| 82 | 87 |
| 83 void setAnimationPolicy(ImageAnimationPolicy policy) override { m_animationP
olicy = policy; } | 88 void setAnimationPolicy(ImageAnimationPolicy policy) override { m_animationP
olicy = policy; } |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi
rst image frame yet from ImageIO. | 196 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi
rst image frame yet from ImageIO. |
| 192 mutable bool m_hasUniformFrameSize : 1; | 197 mutable bool m_hasUniformFrameSize : 1; |
| 193 mutable bool m_haveFrameCount : 1; | 198 mutable bool m_haveFrameCount : 1; |
| 194 }; | 199 }; |
| 195 | 200 |
| 196 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); | 201 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); |
| 197 | 202 |
| 198 } // namespace blink | 203 } // namespace blink |
| 199 | 204 |
| 200 #endif | 205 #endif |
| OLD | NEW |