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

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

Issue 68893031: Unifies LayerTreeHost::SetNeedsUpdateLayers and SetNeedsAnimate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix forced redraw breakage Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_perftest.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 4726 matching lines...) Expand 10 before | Expand all | Expand 10 after
4737 scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor( 4737 scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
4738 new SimpleSwapPromiseMonitor(layer_tree_host(), 4738 new SimpleSwapPromiseMonitor(layer_tree_host(),
4739 NULL, 4739 NULL,
4740 &set_needs_commit_count, 4740 &set_needs_commit_count,
4741 &set_needs_redraw_count)); 4741 &set_needs_redraw_count));
4742 layer_tree_host()->SetNeedsUpdateLayers(); 4742 layer_tree_host()->SetNeedsUpdateLayers();
4743 EXPECT_EQ(2, set_needs_commit_count); 4743 EXPECT_EQ(2, set_needs_commit_count);
4744 EXPECT_EQ(0, set_needs_redraw_count); 4744 EXPECT_EQ(0, set_needs_redraw_count);
4745 } 4745 }
4746 4746
4747 {
4748 scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
4749 new SimpleSwapPromiseMonitor(layer_tree_host(),
4750 NULL,
4751 &set_needs_commit_count,
4752 &set_needs_redraw_count));
4753 layer_tree_host()->SetNeedsAnimate();
4754 EXPECT_EQ(3, set_needs_commit_count);
4755 EXPECT_EQ(0, set_needs_redraw_count);
4756 }
4757
4758 EndTest(); 4747 EndTest();
4759 } 4748 }
4760 4749
4761 virtual void AfterTest() OVERRIDE {} 4750 virtual void AfterTest() OVERRIDE {}
4762 }; 4751 };
4763 4752
4764 MULTI_THREAD_TEST_F(LayerTreeHostTestSimpleSwapPromiseMonitor); 4753 MULTI_THREAD_TEST_F(LayerTreeHostTestSimpleSwapPromiseMonitor);
4765 4754
4766 } // namespace cc 4755 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_perftest.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698