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

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

Issue 1120963003: Implements getImageAnimationPolicy() at ImageLoader. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update API name. Created 5 years, 6 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
« no previous file with comments | « Source/platform/graphics/BitmapImage.cpp ('k') | no next file » | 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 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 virtual void startAnimation(CatchUpAnimation = CatchUp) { } 112 virtual void startAnimation(CatchUpAnimation = CatchUp) { }
113 virtual void stopAnimation() {} 113 virtual void stopAnimation() {}
114 virtual void resetAnimation() {} 114 virtual void resetAnimation() {}
115 115
116 // True if this image can potentially animate. 116 // True if this image can potentially animate.
117 virtual bool maybeAnimated() { return false; } 117 virtual bool maybeAnimated() { return false; }
118 118
119 // Set animationPolicy 119 // Set animationPolicy
120 virtual void setAnimationPolicy(ImageAnimationPolicy) { } 120 virtual void setAnimationPolicy(ImageAnimationPolicy) { }
121 virtual ImageAnimationPolicy animationPolicy() { return ImageAnimationPolicy Allowed; } 121 virtual ImageAnimationPolicy animationPolicy() { return ImageAnimationPolicy Allowed; }
122 virtual void advanceTime(double deltaTimeInSeconds) { }
122 123
123 // Typically the ImageResource that owns us. 124 // Typically the ImageResource that owns us.
124 ImageObserver* imageObserver() const { return m_imageObserver; } 125 ImageObserver* imageObserver() const { return m_imageObserver; }
125 void setImageObserver(ImageObserver* observer) { m_imageObserver = observer; } 126 void setImageObserver(ImageObserver* observer) { m_imageObserver = observer; }
126 127
127 enum TileRule { StretchTile, RoundTile, SpaceTile, RepeatTile }; 128 enum TileRule { StretchTile, RoundTile, SpaceTile, RepeatTile };
128 129
129 virtual bool bitmapForCurrentFrame(SkBitmap*) WARN_UNUSED_RETURN; 130 virtual bool bitmapForCurrentFrame(SkBitmap*) WARN_UNUSED_RETURN;
130 131
131 virtual PassRefPtr<Image> imageForDefaultFrame(); 132 virtual PassRefPtr<Image> imageForDefaultFrame();
(...skipping 25 matching lines...) Expand all
157 RefPtr<SharedBuffer> m_encodedImageData; 158 RefPtr<SharedBuffer> m_encodedImageData;
158 ImageObserver* m_imageObserver; 159 ImageObserver* m_imageObserver;
159 }; 160 };
160 161
161 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ 162 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \
162 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t ypeName()) 163 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t ypeName())
163 164
164 } // namespace blink 165 } // namespace blink
165 166
166 #endif 167 #endif
OLDNEW
« no previous file with comments | « Source/platform/graphics/BitmapImage.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698