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

Unified Diff: cc/trees/layer_tree_host_unittest_animation.cc

Issue 2151433004: cc: Make LayerTreeHostImpl::SwapBuffers not virtual. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@removedidswap
Patch Set: novirtualswapbuffers: num_draws_ Created 4 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 | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_copyrequest.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 4d660a5b0b346be597427094fe8f97fdfbdac42f..c0f63099fcc16ae4c3dddc5939910542fdab4a80 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -1338,11 +1338,21 @@ class LayerTreeHostAnimationTestAddAnimationAfterAnimating
}
}
- void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override {
+ void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
// After both animations have started, verify that they have valid
// start times.
if (host_impl->active_tree()->source_frame_number() < 2)
return;
+
+ // Animation state is updated after drawing.
+ ImplThreadTaskRunner()->PostTask(
+ FROM_HERE,
+ base::Bind(&LayerTreeHostAnimationTestAddAnimationAfterAnimating::
+ CheckAnimations,
+ base::Unretained(this), host_impl));
+ }
+
+ void CheckAnimations(LayerTreeHostImpl* host_impl) {
AnimationHost::ElementToAnimationsMap element_animations_copy =
host_impl->animation_host()->active_element_animations_for_testing();
EXPECT_EQ(2u, element_animations_copy.size());
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_copyrequest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698