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

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

Issue 131003004: Update platform classes to use OVERRIDE / FINAL when needed (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 months 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 | Annotate | Revision Log
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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // a bunch of animation frames, so we should not do things like decode each 146 // a bunch of animation frames, so we should not do things like decode each
147 // one or notify our observers. 147 // one or notify our observers.
148 // Returns whether the animation was advanced. 148 // Returns whether the animation was advanced.
149 bool internalAdvanceAnimation(bool skippingFrames); 149 bool internalAdvanceAnimation(bool skippingFrames);
150 150
151 // Checks to see if the image is a 1x1 solid color. We optimize these image s and just do a fill rect instead. 151 // Checks to see if the image is a 1x1 solid color. We optimize these image s and just do a fill rect instead.
152 // This check should happen regardless whether m_checkedForSolidColor is alr eady set, as the frame may have 152 // This check should happen regardless whether m_checkedForSolidColor is alr eady set, as the frame may have
153 // changed. 153 // changed.
154 void checkForSolidColor(); 154 void checkForSolidColor();
155 155
156 virtual bool mayFillWithSolidColor(); 156 virtual bool mayFillWithSolidColor() OVERRIDE;
157 virtual Color solidColor() const; 157 virtual Color solidColor() const OVERRIDE;
158 158
159 ImageSource m_source; 159 ImageSource m_source;
160 mutable IntSize m_size; // The size to use for the overall image (will just be the size of the first image). 160 mutable IntSize m_size; // The size to use for the overall image (will just be the size of the first image).
161 mutable IntSize m_sizeRespectingOrientation; 161 mutable IntSize m_sizeRespectingOrientation;
162 162
163 size_t m_currentFrame; // The index of the current frame of animation. 163 size_t m_currentFrame; // The index of the current frame of animation.
164 Vector<FrameData, 1> m_frames; // An array of the cached frames of the anima tion. We have to ref frames to pin them in the cache. 164 Vector<FrameData, 1> m_frames; // An array of the cached frames of the anima tion. We have to ref frames to pin them in the cache.
165 165
166 Timer<BitmapImage>* m_frameTimer; 166 Timer<BitmapImage>* m_frameTimer;
167 int m_repetitionCount; // How many total animation loops we should do. This will be cAnimationNone if this image type is incapable of animation. 167 int m_repetitionCount; // How many total animation loops we should do. This will be cAnimationNone if this image type is incapable of animation.
(...skipping 15 matching lines...) Expand all
183 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi rst image frame yet from ImageIO. 183 bool m_sizeAvailable : 1; // Whether or not we can obtain the size of the fi rst image frame yet from ImageIO.
184 mutable bool m_hasUniformFrameSize : 1; 184 mutable bool m_hasUniformFrameSize : 1;
185 mutable bool m_haveFrameCount : 1; 185 mutable bool m_haveFrameCount : 1;
186 }; 186 };
187 187
188 DEFINE_IMAGE_TYPE_CASTS(BitmapImage); 188 DEFINE_IMAGE_TYPE_CASTS(BitmapImage);
189 189
190 } 190 }
191 191
192 #endif 192 #endif
OLDNEW
« no previous file with comments | « Source/platform/fonts/SimpleFontData.h ('k') | Source/platform/graphics/Canvas2DImageBufferSurface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698