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

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

Issue 15058004: cc: Rename VSync to BeginFrame (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix test compiler errors Created 7 years, 7 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 "cc/animation/animation_curve.h" 7 #include "cc/animation/animation_curve.h"
8 #include "cc/animation/layer_animation_controller.h" 8 #include "cc/animation/layer_animation_controller.h"
9 #include "cc/animation/timing_function.h" 9 #include "cc/animation/timing_function.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 if (TestEnded()) 754 if (TestEnded())
755 return result; 755 return result;
756 // Act like there is checkerboard when the second animation wants to draw. 756 // Act like there is checkerboard when the second animation wants to draw.
757 ++prevented_draw_; 757 ++prevented_draw_;
758 return false; 758 return false;
759 } 759 }
760 760
761 virtual void DidCommitAndDrawFrame() OVERRIDE { 761 virtual void DidCommitAndDrawFrame() OVERRIDE {
762 switch (layer_tree_host()->commit_number()) { 762 switch (layer_tree_host()->commit_number()) {
763 case 1: 763 case 1:
764 // The animation is longer than 1 vsync. 764 // The animation is longer than 1 BeginFrame interval.
765 AddOpacityTransitionToLayer(content_, 0.1, 0.2f, 0.8f, false); 765 AddOpacityTransitionToLayer(content_, 0.1, 0.2f, 0.8f, false);
766 added_animations_++; 766 added_animations_++;
767 break; 767 break;
768 case 2: 768 case 2:
769 // This second animation will not be drawn so it should not start. 769 // This second animation will not be drawn so it should not start.
770 AddAnimatedTransformToLayer(content_, 0.1, 5, 5); 770 AddAnimatedTransformToLayer(content_, 0.1, 5, 5);
771 added_animations_++; 771 added_animations_++;
772 break; 772 break;
773 } 773 }
774 } 774 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 FakeContentLayerClient client_; 867 FakeContentLayerClient client_;
868 scoped_refptr<FakeContentLayer> root_layer_; 868 scoped_refptr<FakeContentLayer> root_layer_;
869 int started_times_; 869 int started_times_;
870 int num_commit_complete_; 870 int num_commit_complete_;
871 }; 871 };
872 872
873 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestPinchZoomScrollbars); 873 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestPinchZoomScrollbars);
874 874
875 } // namespace 875 } // namespace
876 } // namespace cc 876 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698