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

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

Issue 141833002: Revert 245445 "Unifies LayerTreeHost::SetNeedsUpdateLayers and S..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
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 4673 matching lines...) Expand 10 before | Expand all | Expand 10 after
4684 scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor( 4684 scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
4685 new SimpleSwapPromiseMonitor(layer_tree_host(), 4685 new SimpleSwapPromiseMonitor(layer_tree_host(),
4686 NULL, 4686 NULL,
4687 &set_needs_commit_count, 4687 &set_needs_commit_count,
4688 &set_needs_redraw_count)); 4688 &set_needs_redraw_count));
4689 layer_tree_host()->SetNeedsUpdateLayers(); 4689 layer_tree_host()->SetNeedsUpdateLayers();
4690 EXPECT_EQ(2, set_needs_commit_count); 4690 EXPECT_EQ(2, set_needs_commit_count);
4691 EXPECT_EQ(0, set_needs_redraw_count); 4691 EXPECT_EQ(0, set_needs_redraw_count);
4692 } 4692 }
4693 4693
4694 {
4695 scoped_ptr<SimpleSwapPromiseMonitor> swap_promise_monitor(
4696 new SimpleSwapPromiseMonitor(layer_tree_host(),
4697 NULL,
4698 &set_needs_commit_count,
4699 &set_needs_redraw_count));
4700 layer_tree_host()->SetNeedsAnimate();
4701 EXPECT_EQ(3, set_needs_commit_count);
4702 EXPECT_EQ(0, set_needs_redraw_count);
4703 }
4704
4694 EndTest(); 4705 EndTest();
4695 } 4706 }
4696 4707
4697 virtual void AfterTest() OVERRIDE {} 4708 virtual void AfterTest() OVERRIDE {}
4698 }; 4709 };
4699 4710
4700 MULTI_THREAD_TEST_F(LayerTreeHostTestSimpleSwapPromiseMonitor); 4711 MULTI_THREAD_TEST_F(LayerTreeHostTestSimpleSwapPromiseMonitor);
4701 4712
4702 } // namespace cc 4713 } // namespace cc
OLDNEW
« no previous file with comments | « trunk/src/cc/trees/layer_tree_host_perftest.cc ('k') | trunk/src/cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698