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

Unified Diff: cc/test/animation_timelines_test_common.cc

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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/animation_timelines_test_common.h ('k') | cc/test/layer_test_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/animation_timelines_test_common.cc
diff --git a/cc/test/animation_timelines_test_common.cc b/cc/test/animation_timelines_test_common.cc
index 473c7163fa54b3ed395b2d201f7ca551519df3ed..2d164afc8d833513698a0275fa3f53c322ee4279 100644
--- a/cc/test/animation_timelines_test_common.cc
+++ b/cc/test/animation_timelines_test_common.cc
@@ -180,9 +180,9 @@ gfx::ScrollOffset TestHostClient::GetScrollOffsetForAnimation(
void TestHostClient::RegisterElement(ElementId element_id,
ElementListType list_type) {
- LayerIdToTestLayer& layers_in_tree = list_type == ElementListType::ACTIVE
- ? layers_in_active_tree_
- : layers_in_pending_tree_;
+ ElementIdToTestLayer& layers_in_tree = list_type == ElementListType::ACTIVE
+ ? layers_in_active_tree_
+ : layers_in_pending_tree_;
DCHECK(layers_in_tree.find(element_id) == layers_in_tree.end());
layers_in_tree[element_id] = TestLayer::Create();
@@ -195,9 +195,9 @@ void TestHostClient::UnregisterElement(ElementId element_id,
DCHECK(host_);
host_->UnregisterElement(element_id, list_type);
- LayerIdToTestLayer& layers_in_tree = list_type == ElementListType::ACTIVE
- ? layers_in_active_tree_
- : layers_in_pending_tree_;
+ ElementIdToTestLayer& layers_in_tree = list_type == ElementListType::ACTIVE
+ ? layers_in_active_tree_
+ : layers_in_pending_tree_;
auto kv = layers_in_tree.find(element_id);
DCHECK(kv != layers_in_tree.end());
layers_in_tree.erase(kv);
@@ -303,7 +303,7 @@ void TestHostClient::ExpectTransformPropertyMutated(ElementId element_id,
TestLayer* TestHostClient::FindTestLayer(ElementId element_id,
ElementListType list_type) const {
- const LayerIdToTestLayer& layers_in_tree =
+ const ElementIdToTestLayer& layers_in_tree =
list_type == ElementListType::ACTIVE ? layers_in_active_tree_
: layers_in_pending_tree_;
auto kv = layers_in_tree.find(element_id);
@@ -362,7 +362,7 @@ AnimationTimelinesTest::AnimationTimelinesTest()
host_ = client_.host();
host_impl_ = client_impl_.host();
- element_id_ = NextTestLayerId();
+ element_id_ = ElementId(NextTestLayerId(), 0);
}
AnimationTimelinesTest::~AnimationTimelinesTest() {
@@ -451,7 +451,7 @@ void AnimationTimelinesTest::AnimateLayersTransferEvents(
host_->SetAnimationEvents(std::move(events));
}
-AnimationPlayer* AnimationTimelinesTest::GetPlayerForLayerId(
+AnimationPlayer* AnimationTimelinesTest::GetPlayerForElementId(
ElementId element_id) {
const scoped_refptr<ElementAnimations> element_animations =
host_->GetElementAnimationsForElementId(element_id);
« no previous file with comments | « cc/test/animation_timelines_test_common.h ('k') | cc/test/layer_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698