Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(483)

Side by Side Diff: Source/platform/graphics/BitmapImage.h

Issue 754813002: Expose setting API to set ImageAnimationPolicy(Allowed, Once, None) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update Code Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/graphics/BitmapImage.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 14 matching lines...) Expand all
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
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/ImageOrientation.h" 36 #include "platform/graphics/ImageOrientation.h"
36 #include "platform/graphics/ImageSource.h" 37 #include "platform/graphics/ImageSource.h"
37 #include "wtf/Forward.h" 38 #include "wtf/Forward.h"
38 39
39 namespace blink { 40 namespace blink {
40 41
41 class NativeImageSkia; 42 class NativeImageSkia;
42 template <typename T> class Timer; 43 template <typename T> class Timer;
43 44
44 class PLATFORM_EXPORT BitmapImage : public Image { 45 class PLATFORM_EXPORT BitmapImage : public Image {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 Timer<BitmapImage>* m_frameTimer; 174 Timer<BitmapImage>* m_frameTimer;
174 int m_repetitionCount; // How many total animation loops we should do. This will be cAnimationNone if this image type is incapable of animation. 175 int m_repetitionCount; // How many total animation loops we should do. This will be cAnimationNone if this image type is incapable of animation.
175 RepetitionCountStatus m_repetitionCountStatus; 176 RepetitionCountStatus m_repetitionCountStatus;
176 int m_repetitionsComplete; // How many repetitions we've finished. 177 int m_repetitionsComplete; // How many repetitions we've finished.
177 double m_desiredFrameStartTime; // The system time at which we hope to see the next call to startAnimation(). 178 double m_desiredFrameStartTime; // The system time at which we hope to see the next call to startAnimation().
178 179
179 Color m_solidColor; // If we're a 1x1 solid color, this is the color to use to fill. 180 Color m_solidColor; // If we're a 1x1 solid color, this is the color to use to fill.
180 181
181 size_t m_frameCount; 182 size_t m_frameCount;
182 183
184 ImageAnimationPolicy m_animationPolicy; // Whether or not we can play animat ion.
185
183 bool m_isSolidColor : 1; // Whether or not we are a 1x1 solid image. 186 bool m_isSolidColor : 1; // Whether or not we are a 1x1 solid image.
184 bool m_checkedForSolidColor : 1; // Whether we've checked the frame for soli d color. 187 bool m_checkedForSolidColor : 1; // Whether we've checked the frame for soli d color.
185 188
186 bool m_animationFinished : 1; // Whether or not we've completed the entire a nimation. 189 bool m_animationFinished : 1; // Whether or not we've completed the entire a nimation.
187 190
188 bool m_allDataReceived : 1; // Whether or not we've received all our data. 191 bool m_allDataReceived : 1; // Whether or not we've received all our data.
189 mutable bool m_haveSize : 1; // Whether or not our |m_size| member variable has the final overall image size yet. 192 mutable bool m_haveSize : 1; // Whether or not our |m_size| member variable has the final overall image size yet.
190 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi rst image frame yet from ImageIO. 193 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi rst image frame yet from ImageIO.
191 mutable bool m_hasUniformFrameSize : 1; 194 mutable bool m_hasUniformFrameSize : 1;
192 mutable bool m_haveFrameCount : 1; 195 mutable bool m_haveFrameCount : 1;
193 }; 196 };
194 197
195 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); 198 DEFINE_IMAGE_TYPE_CASTS(BitmapImage);
196 199
197 } // namespace blink 200 } // namespace blink
198 201
199 #endif 202 #endif
OLDNEW
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/graphics/BitmapImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698