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

Side by Side Diff: cc/animation/scroll_offset_animations.h

Issue 1973083002: Use element id's for animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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 | « cc/animation/element_id.cc ('k') | cc/blink/web_layer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_H_ 5 #ifndef CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_H_
6 #define CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_H_ 6 #define CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_H_
7 7
8 #include <unordered_map> 8 #include <unordered_map>
9 9
10 #include "cc/animation/scroll_offset_animations_impl.h" 10 #include "cc/animation/scroll_offset_animations_impl.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 bool HasUpdatesForTesting() const; 44 bool HasUpdatesForTesting() const;
45 45
46 // Goes through the updates in the order in which they're added and calls the 46 // Goes through the updates in the order in which they're added and calls the
47 // appropriate handler for each update. 47 // appropriate handler for each update.
48 void PushPropertiesTo(ScrollOffsetAnimationsImpl*); 48 void PushPropertiesTo(ScrollOffsetAnimationsImpl*);
49 49
50 private: 50 private:
51 ScrollOffsetAnimationUpdate GetUpdateForElementId(ElementId) const; 51 ScrollOffsetAnimationUpdate GetUpdateForElementId(ElementId) const;
52 52
53 using ElementToUpdateMap = 53 using ElementToUpdateMap =
54 std::unordered_map<ElementId, ScrollOffsetAnimationUpdate>; 54 std::unordered_map<ElementId, ScrollOffsetAnimationUpdate, ElementIdHash>;
55 ElementToUpdateMap element_to_update_map_; 55 ElementToUpdateMap element_to_update_map_;
56 56
57 AnimationHost* animation_host_; 57 AnimationHost* animation_host_;
58 }; 58 };
59 59
60 } // namespace cc 60 } // namespace cc
61 61
62 #endif // CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_H_ 62 #endif // CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_H_
OLDNEW
« no previous file with comments | « cc/animation/element_id.cc ('k') | cc/blink/web_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698