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

Unified Diff: cc/trees/layer_tree_host_unittest_animation.cc

Issue 347483002: Removing the animate step from DoSwapInternal as it happens in the ScheduleAnimate method now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase onto master. Created 6 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
« no previous file with comments | « no previous file | cc/trees/thread_proxy.cc » ('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 f717c2af9cf61ad23e0b38491a6b59b4a9993fe8..97108df6548a16f43788adb412b2fe60a2659321 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -1286,7 +1286,7 @@ class LayerTreeHostAnimationTestAddAnimationAfterAnimating
: public LayerTreeHostAnimationTest {
public:
LayerTreeHostAnimationTestAddAnimationAfterAnimating()
- : num_swap_buffers_(0) {}
+ : num_swap_buffers_(0), num_animate_calls_(0) {}
virtual void SetupTree() OVERRIDE {
LayerTreeHostAnimationTest::SetupTree();
@@ -1311,6 +1311,12 @@ class LayerTreeHostAnimationTestAddAnimationAfterAnimating
}
}
+ virtual void Animate(base::TimeTicks monotonic_time) OVERRIDE {
+ EXPECT_LT(num_animate_calls_, num_swap_buffers_);
+ num_animate_calls_++;
+ LayerTreeHostAnimationTest::Animate(monotonic_time);
+ }
+
virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
bool result) OVERRIDE {
// After both animations have started, verify that they have valid
@@ -1342,6 +1348,7 @@ class LayerTreeHostAnimationTestAddAnimationAfterAnimating
private:
scoped_refptr<Layer> content_;
int num_swap_buffers_;
+ int num_animate_calls_;
};
SINGLE_AND_MULTI_THREAD_TEST_F(
« no previous file with comments | « no previous file | cc/trees/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698