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

Unified Diff: ui/compositor/layer_animation_element.h

Issue 134453004: Use a bitfield to store animatable properties. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix another win build error (signed/unsigned comp). 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/app_list/views/pulsing_block_view.cc ('k') | ui/compositor/layer_animation_element.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_animation_element.h
diff --git a/ui/compositor/layer_animation_element.h b/ui/compositor/layer_animation_element.h
index 1127424087fc015f0a1903a9839d422fb4c3d0e6..0b880a44acb47df2d0cebb54d34ef2b49b0c6766 100644
--- a/ui/compositor/layer_animation_element.h
+++ b/ui/compositor/layer_animation_element.h
@@ -28,13 +28,18 @@ class LayerAnimationDelegate;
class COMPOSITOR_EXPORT LayerAnimationElement {
public:
enum AnimatableProperty {
- TRANSFORM = 0,
- BOUNDS,
- OPACITY,
- VISIBILITY,
- BRIGHTNESS,
- GRAYSCALE,
- COLOR,
+ UNKNOWN = 0,
+ TRANSFORM = (1 << 0),
+ BOUNDS = (1 << 1),
+ OPACITY = (1 << 2),
+ VISIBILITY = (1 << 3),
+ BRIGHTNESS = (1 << 4),
+ GRAYSCALE = (1 << 5),
+ COLOR = (1 << 6),
+
+ // Used when iterating over properties.
+ FIRST_PROPERTY = TRANSFORM,
+ SENTINEL = (1 << 7)
};
static AnimatableProperty ToAnimatableProperty(
@@ -54,9 +59,9 @@ class COMPOSITOR_EXPORT LayerAnimationElement {
SkColor color;
};
- typedef std::set<AnimatableProperty> AnimatableProperties;
+ typedef uint32 AnimatableProperties;
- LayerAnimationElement(const AnimatableProperties& properties,
+ LayerAnimationElement(AnimatableProperties properties,
base::TimeDelta duration);
virtual ~LayerAnimationElement();
@@ -124,7 +129,7 @@ class COMPOSITOR_EXPORT LayerAnimationElement {
// Creates an element that pauses the given properties. The caller owns the
// return value.
static LayerAnimationElement* CreatePauseElement(
- const AnimatableProperties& properties,
+ AnimatableProperties properties,
base::TimeDelta duration);
// Creates an element that transitions to the given color. The caller owns the
@@ -178,7 +183,7 @@ class COMPOSITOR_EXPORT LayerAnimationElement {
void GetTargetValue(TargetValue* target) const;
// The properties that the element modifies.
- const AnimatableProperties& properties() const { return properties_; }
+ AnimatableProperties properties() const { return properties_; }
// Whether this element animates on the compositor thread.
virtual bool IsThreaded() const;
« no previous file with comments | « ui/app_list/views/pulsing_block_view.cc ('k') | ui/compositor/layer_animation_element.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698