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

Unified Diff: cc/animation/layer_animation_controller.h

Issue 1806223002: CC Animation: Use bitset instead of unordered_set in LayerAnimationController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use operator[] Created 4 years, 9 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 | « no previous file | cc/animation/layer_animation_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/layer_animation_controller.h
diff --git a/cc/animation/layer_animation_controller.h b/cc/animation/layer_animation_controller.h
index c6cc506dd779036873de98a3ec1b2522cbbcb1f5..2676d812f135b7d7fe81b73f85a05e9b435037b8 100644
--- a/cc/animation/layer_animation_controller.h
+++ b/cc/animation/layer_animation_controller.h
@@ -5,7 +5,7 @@
#ifndef CC_ANIMATION_LAYER_ANIMATION_CONTROLLER_H_
#define CC_ANIMATION_LAYER_ANIMATION_CONTROLLER_H_
-#include <unordered_set>
+#include <bitset>
#include <vector>
#include "base/macros.h"
@@ -15,6 +15,7 @@
#include "base/time/time.h"
#include "cc/animation/animation.h"
#include "cc/animation/layer_animation_event_observer.h"
+#include "cc/animation/target_property.h"
#include "cc/base/cc_export.h"
#include "ui/gfx/geometry/scroll_offset.h"
#include "ui/gfx/transform.h"
@@ -175,7 +176,9 @@ class CC_EXPORT LayerAnimationController
explicit LayerAnimationController(int id);
~LayerAnimationController();
- using TargetProperties = std::unordered_set<int>;
+ // A set of target properties. TargetProperty must be 0-based enum.
+ using TargetProperties =
+ std::bitset<TargetProperty::LAST_TARGET_PROPERTY + 1>;
void PushNewAnimationsToImplThread(
LayerAnimationController* controller_impl) const;
« no previous file with comments | « no previous file | cc/animation/layer_animation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698