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

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

Issue 133263004: Unifies LayerTreeHost::SetNeedsUpdateLayers and SetNeedsAnimate -- V2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mojo build Created 6 years, 11 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 | 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 4736 matching lines...) Expand 10 before | Expand all | Expand 10 after
4747 scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor( 4747 scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
4748 new SimpleSwapPromiseMonitor(layer_tree_host(), 4748 new SimpleSwapPromiseMonitor(layer_tree_host(),
4749 NULL, 4749 NULL,
4750 &set_needs_commit_count, 4750 &set_needs_commit_count,
4751 &set_needs_redraw_count)); 4751 &set_needs_redraw_count));
4752 layer_tree_host()->SetNeedsUpdateLayers(); 4752 layer_tree_host()->SetNeedsUpdateLayers();
4753 EXPECT_EQ(2, set_needs_commit_count); 4753 EXPECT_EQ(2, set_needs_commit_count);
4754 EXPECT_EQ(0, set_needs_redraw_count); 4754 EXPECT_EQ(0, set_needs_redraw_count);
4755 } 4755 }
4756 4756
4757 {
4758 scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
4759 new SimpleSwapPromiseMonitor(layer_tree_host(),
4760 NULL,
4761 &set_needs_commit_count,
4762 &set_needs_redraw_count));
4763 layer_tree_host()->SetNeedsAnimate();
4764 EXPECT_EQ(3, set_needs_commit_count);
4765 EXPECT_EQ(0, set_needs_redraw_count);
4766 }
4767
4768 EndTest(); 4757 EndTest();
4769 } 4758 }
4770 4759
4771 virtual void AfterTest() OVERRIDE {} 4760 virtual void AfterTest() OVERRIDE {}
4772 }; 4761 };
4773 4762
4774 MULTI_THREAD_TEST_F(LayerTreeHostTestSimpleSwapPromiseMonitor); 4763 MULTI_THREAD_TEST_F(LayerTreeHostTestSimpleSwapPromiseMonitor);
4775 4764
4776 } // namespace cc 4765 } // 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