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

Unified Diff: cc/trees/layer_tree_host_unittest_animation.cc

Issue 654203007: cc: Delete non-impl-side-painting animation freezing logic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/trees/thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_animation.cc
diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc
index f3bbe0a555d14e9dcbd9bca4e9b57e00378af038..67fb6f81dc05750b817773139598d0e8969da916 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -1079,76 +1079,6 @@ class LayerTreeHostAnimationTestScrollOffsetChangesArePropagated
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestScrollOffsetChangesArePropagated);
-// Ensure that animation time is correctly updated when animations are frozen
-// because of checkerboarding.
-class LayerTreeHostAnimationTestFrozenAnimationTickTime
- : public LayerTreeHostAnimationTest {
- public:
- LayerTreeHostAnimationTestFrozenAnimationTickTime()
- : started_animating_(false), num_commits_(0), num_draw_attempts_(2) {}
-
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
- // Make sure that drawing many times doesn't cause a checkerboarded
- // animation to start so we avoid flake in this test.
- settings->timeout_and_draw_when_animation_checkerboards = false;
- }
-
- virtual void BeginTest() override {
- PostAddAnimationToMainThread(layer_tree_host()->root_layer());
- }
-
- virtual void BeginMainFrame(const BeginFrameArgs& args) override {
- last_main_thread_tick_time_ = args.frame_time;
- }
-
- virtual void AnimateLayers(LayerTreeHostImpl* host_impl,
- base::TimeTicks monotonic_time) override {
- if (TestEnded())
- return;
- if (!started_animating_) {
- started_animating_ = true;
- expected_impl_tick_time_ = monotonic_time;
- } else {
- EXPECT_EQ(expected_impl_tick_time_, monotonic_time);
- if (num_commits_ > 2)
- EndTest();
- }
- }
-
- virtual DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
- LayerTreeHostImpl::FrameData* frame,
- DrawResult draw_result) override {
- if (TestEnded())
- return draw_result;
- num_draw_attempts_++;
- if (num_draw_attempts_ > 2) {
- num_draw_attempts_ = 0;
- PostSetNeedsCommitToMainThread();
- }
- return DRAW_ABORTED_CHECKERBOARD_ANIMATIONS;
- }
-
- virtual void BeginCommitOnThread(LayerTreeHostImpl* host_impl) override {
- if (!started_animating_)
- return;
- expected_impl_tick_time_ =
- std::max(expected_impl_tick_time_, last_main_thread_tick_time_);
- num_commits_++;
- }
-
- virtual void AfterTest() override {}
-
- private:
- bool started_animating_;
- int num_commits_;
- int num_draw_attempts_;
- base::TimeTicks last_main_thread_tick_time_;
- base::TimeTicks expected_impl_tick_time_;
-};
-
-// Only the non-impl-paint multi-threaded compositor freezes animations.
-MULTI_THREAD_NOIMPL_TEST_F(LayerTreeHostAnimationTestFrozenAnimationTickTime);
-
// When animations are simultaneously added to an existing layer and to a new
// layer, they should start at the same time, even when there's already a
// running animation on the existing layer.
« no previous file with comments | « no previous file | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698