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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 private: | 94 private: |
95 enum RepetitionCountStatus { | 95 enum RepetitionCountStatus { |
96 Unknown, // We haven't checked the source's repetition count. | 96 Unknown, // We haven't checked the source's repetition count. |
97 Uncertain, // We have a repetition count, but it might be wrong (some GIF
s have a count after the image data, and will report "loop once" until all data
has been decoded). | 97 Uncertain, // We have a repetition count, but it might be wrong (some GIF
s have a count after the image data, and will report "loop once" until all data
has been decoded). |
98 Certain // The repetition count is known to be correct. | 98 Certain // The repetition count is known to be correct. |
99 }; | 99 }; |
100 | 100 |
101 BitmapImage(const SkBitmap &, ImageObserver* = 0); | 101 BitmapImage(const SkBitmap &, ImageObserver* = 0); |
102 BitmapImage(ImageObserver* = 0); | 102 BitmapImage(ImageObserver* = 0); |
103 | 103 |
104 void draw(SkCanvas*, const SkPaint&, const FloatRect& dstRect, const FloatRe
ct& srcRect, RespectImageOrientationEnum, ImageClampingMode) override; | 104 void draw(SkCanvas*, const SkPaint&, const FloatRect& dstRect, const FloatRe
ct& srcRect, bool imageSmoothingEnabled, RespectImageOrientationEnum, ImageClamp
ingMode) override; |
105 | 105 |
106 size_t currentFrame() const { return m_currentFrame; } | 106 size_t currentFrame() const { return m_currentFrame; } |
107 size_t frameCount(); | 107 size_t frameCount(); |
108 | 108 |
109 PassRefPtr<SkImage> frameAtIndex(size_t); | 109 PassRefPtr<SkImage> frameAtIndex(size_t); |
110 | 110 |
111 bool frameIsCompleteAtIndex(size_t); | 111 bool frameIsCompleteAtIndex(size_t); |
112 float frameDurationAtIndex(size_t); | 112 float frameDurationAtIndex(size_t); |
113 bool frameHasAlphaAtIndex(size_t); | 113 bool frameHasAlphaAtIndex(size_t); |
114 ImageOrientation frameOrientationAtIndex(size_t); | 114 ImageOrientation frameOrientationAtIndex(size_t); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 mutable bool m_haveSize : 1; // Whether or not our |m_size| member variable
has the final overall image size yet. | 180 mutable bool m_haveSize : 1; // Whether or not our |m_size| member variable
has the final overall image size yet. |
181 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi
rst image frame yet from ImageIO. | 181 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi
rst image frame yet from ImageIO. |
182 mutable bool m_haveFrameCount : 1; | 182 mutable bool m_haveFrameCount : 1; |
183 }; | 183 }; |
184 | 184 |
185 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); | 185 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); |
186 | 186 |
187 } // namespace blink | 187 } // namespace blink |
188 | 188 |
189 #endif | 189 #endif |
OLD | NEW |