| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 void resetAnimation() override; | 76 void resetAnimation() override; |
| 77 bool maybeAnimated() override; | 77 bool maybeAnimated() override; |
| 78 | 78 |
| 79 void setAnimationPolicy(ImageAnimationPolicy policy) override { | 79 void setAnimationPolicy(ImageAnimationPolicy policy) override { |
| 80 m_animationPolicy = policy; | 80 m_animationPolicy = policy; |
| 81 } | 81 } |
| 82 ImageAnimationPolicy animationPolicy() override { return m_animationPolicy; } | 82 ImageAnimationPolicy animationPolicy() override { return m_animationPolicy; } |
| 83 void advanceTime(double deltaTimeInSeconds) override; | 83 void advanceTime(double deltaTimeInSeconds) override; |
| 84 | 84 |
| 85 sk_sp<SkImage> imageForCurrentFrame() override; | 85 sk_sp<SkImage> imageForCurrentFrame(const ColorBehavior&) override; |
| 86 PassRefPtr<Image> imageForDefaultFrame() override; | 86 PassRefPtr<Image> imageForDefaultFrame() override; |
| 87 | 87 |
| 88 bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override; | 88 bool currentFrameKnownToBeOpaque(MetadataMode = UseCurrentMetadata) override; |
| 89 bool currentFrameIsComplete() override; | 89 bool currentFrameIsComplete() override; |
| 90 bool currentFrameIsLazyDecoded() override; | 90 bool currentFrameIsLazyDecoded() override; |
| 91 | 91 |
| 92 ImageOrientation currentFrameOrientation(); | 92 ImageOrientation currentFrameOrientation(); |
| 93 | 93 |
| 94 // Construct a BitmapImage with the given orientation. | 94 // Construct a BitmapImage with the given orientation. |
| 95 static PassRefPtr<BitmapImage> createWithOrientationForTesting( | 95 static PassRefPtr<BitmapImage> createWithOrientationForTesting( |
| (...skipping 12 matching lines...) Expand all Loading... |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 BitmapImage(const SkBitmap&, ImageObserver* = 0); | 110 BitmapImage(const SkBitmap&, ImageObserver* = 0); |
| 111 BitmapImage(ImageObserver* = 0); | 111 BitmapImage(ImageObserver* = 0); |
| 112 | 112 |
| 113 void draw(SkCanvas*, | 113 void draw(SkCanvas*, |
| 114 const SkPaint&, | 114 const SkPaint&, |
| 115 const FloatRect& dstRect, | 115 const FloatRect& dstRect, |
| 116 const FloatRect& srcRect, | 116 const FloatRect& srcRect, |
| 117 RespectImageOrientationEnum, | 117 RespectImageOrientationEnum, |
| 118 ImageClampingMode) override; | 118 ImageClampingMode, |
| 119 const ColorBehavior&) override; |
| 119 | 120 |
| 120 size_t currentFrame() const { return m_currentFrame; } | 121 size_t currentFrame() const { return m_currentFrame; } |
| 121 size_t frameCount(); | 122 size_t frameCount(); |
| 122 | 123 |
| 123 sk_sp<SkImage> frameAtIndex(size_t, const ColorBehavior&); | 124 sk_sp<SkImage> frameAtIndex(size_t, const ColorBehavior&); |
| 124 | 125 |
| 125 bool frameIsCompleteAtIndex(size_t) const; | 126 bool frameIsCompleteAtIndex(size_t) const; |
| 126 float frameDurationAtIndex(size_t) const; | 127 float frameDurationAtIndex(size_t) const; |
| 127 bool frameHasAlphaAtIndex(size_t); | 128 bool frameHasAlphaAtIndex(size_t); |
| 128 ImageOrientation frameOrientationAtIndex(size_t); | 129 ImageOrientation frameOrientationAtIndex(size_t); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 bool m_sizeAvailable : 1; // Whether we can obtain the size of the first | 218 bool m_sizeAvailable : 1; // Whether we can obtain the size of the first |
| 218 // image frame from ImageIO yet. | 219 // image frame from ImageIO yet. |
| 219 mutable bool m_haveFrameCount : 1; | 220 mutable bool m_haveFrameCount : 1; |
| 220 }; | 221 }; |
| 221 | 222 |
| 222 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); | 223 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); |
| 223 | 224 |
| 224 } // namespace blink | 225 } // namespace blink |
| 225 | 226 |
| 226 #endif | 227 #endif |
| OLD | NEW |