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

Unified Diff: cc/test/animation_timelines_test_common.cc

Issue 1009233002: CC Animations: Port Impl-only-scrolling to use compositor animation timelines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ui
Patch Set: Revert AnimationHost::thread_instance_ deletion back. Created 5 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 side-by-side diff with in-line comments
Download patch
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 5789e870a4f8e2117aab13142eaa1a7466a5bf9d..54056080e4efb65d0d01566daf61da462d2c2d8e 100644
--- a/cc/test/animation_timelines_test_common.cc
+++ b/cc/test/animation_timelines_test_common.cc
@@ -35,8 +35,9 @@ void TestLayer::ClearMutatedProperties() {
mutated_properties_[i] = false;
}
-TestHostClient::TestHostClient()
- : host_(AnimationHost::Create()), mutators_need_commit_(false) {
+TestHostClient::TestHostClient(ThreadInstance thread_instance)
+ : host_(AnimationHost::Create(thread_instance)),
+ mutators_need_commit_(false) {
host_->SetMutatorHostClient(this);
}
@@ -97,6 +98,11 @@ void TestHostClient::SetLayerScrollOffsetMutated(
layer->set_scroll_offset(scroll_offset);
}
+gfx::ScrollOffset TestHostClient::GetScrollOffsetForAnimation(
+ int layer_id) const {
+ return gfx::ScrollOffset();
+}
+
void TestHostClient::RegisterLayer(int layer_id, LayerTreeType tree_type) {
LayerIdToTestLayer& layers_in_tree = tree_type == LayerTreeType::ACTIVE
? layers_in_active_tree_
@@ -192,7 +198,11 @@ void TestAnimationDelegate::NotifyAnimationFinished(
}
AnimationTimelinesTest::AnimationTimelinesTest()
- : timeline_id_(AnimationIdProvider::NextTimelineId()),
+ : client_(ThreadInstance::MAIN),
+ client_impl_(ThreadInstance::IMPL),
+ host_(nullptr),
+ host_impl_(nullptr),
+ timeline_id_(AnimationIdProvider::NextTimelineId()),
player_id_(AnimationIdProvider::NextPlayerId()),
layer_id_(1) {
host_ = client_.host();

Powered by Google App Engine
This is Rietveld 408576698