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

Side by Side Diff: cc/trees/layer_tree_host_unittest_animation.cc

Issue 1766053002: Clean LayerImpl's scroll offset callers in unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove transform tree update setting 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #include "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "cc/animation/animation_curve.h" 9 #include "cc/animation/animation_curve.h"
10 #include "cc/animation/layer_animation_controller.h" 10 #include "cc/animation/layer_animation_controller.h"
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 scroll_layer_impl->layer_animation_controller()->GetAnimation( 765 scroll_layer_impl->layer_animation_controller()->GetAnimation(
766 TargetProperty::SCROLL_OFFSET); 766 TargetProperty::SCROLL_OFFSET);
767 767
768 if (!animation || animation->run_state() != Animation::RUNNING) { 768 if (!animation || animation->run_state() != Animation::RUNNING) {
769 host_impl->BlockNotifyReadyToActivateForTesting(false); 769 host_impl->BlockNotifyReadyToActivateForTesting(false);
770 return; 770 return;
771 } 771 }
772 772
773 // Block activation until the running animation has a chance to produce a 773 // Block activation until the running animation has a chance to produce a
774 // scroll delta. 774 // scroll delta.
775 gfx::Vector2dF scroll_delta = scroll_layer_impl->ScrollDelta(); 775 gfx::Vector2dF scroll_delta = ScrollDelta(scroll_layer_impl);
776 if (scroll_delta.x() < 1.f || scroll_delta.y() < 1.f) 776 if (scroll_delta.x() < 1.f || scroll_delta.y() < 1.f)
777 return; 777 return;
778 778
779 host_impl->BlockNotifyReadyToActivateForTesting(false); 779 host_impl->BlockNotifyReadyToActivateForTesting(false);
780 } 780 }
781 781
782 void WillActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { 782 void WillActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
783 if (host_impl->pending_tree()->source_frame_number() != 1) 783 if (host_impl->pending_tree()->source_frame_number() != 1)
784 return; 784 return;
785 LayerImpl* scroll_layer_impl = 785 LayerImpl* scroll_layer_impl =
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 bool called_animation_finished_; 1347 bool called_animation_finished_;
1348 FakeContentLayerClient client_; 1348 FakeContentLayerClient client_;
1349 scoped_refptr<FakePictureLayer> picture_; 1349 scoped_refptr<FakePictureLayer> picture_;
1350 }; 1350 };
1351 1351
1352 SINGLE_AND_MULTI_THREAD_TEST_F( 1352 SINGLE_AND_MULTI_THREAD_TEST_F(
1353 LayerTreeHostAnimationTestNotifyAnimationFinished); 1353 LayerTreeHostAnimationTestNotifyAnimationFinished);
1354 1354
1355 } // namespace 1355 } // namespace
1356 } // namespace cc 1356 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_animation_timelines.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698