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

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

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « cc/trees/layer_tree_impl_unittest.cc ('k') | cc/trees/occlusion_tracker_unittest.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/occlusion_tracker.h" 5 #include "cc/trees/occlusion_tracker.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "cc/debug/lap_timer.h" 8 #include "cc/debug/lap_timer.h"
9 #include "cc/layers/layer_iterator.h" 9 #include "cc/layers/layer_iterator.h"
10 #include "cc/layers/solid_color_layer_impl.h" 10 #include "cc/layers/solid_color_layer_impl.h"
(...skipping 28 matching lines...) Expand all
39 host_impl_ = LayerTreeHostImpl::Create(settings, 39 host_impl_ = LayerTreeHostImpl::Create(settings,
40 &client_, 40 &client_,
41 &proxy_, 41 &proxy_,
42 &stats_, 42 &stats_,
43 shared_bitmap_manager_.get(), 43 shared_bitmap_manager_.get(),
44 NULL, 44 NULL,
45 1); 45 1);
46 host_impl_->InitializeRenderer(FakeOutputSurface::Create3d()); 46 host_impl_->InitializeRenderer(FakeOutputSurface::Create3d());
47 47
48 scoped_ptr<LayerImpl> root_layer = LayerImpl::Create(active_tree(), 1); 48 scoped_ptr<LayerImpl> root_layer = LayerImpl::Create(active_tree(), 1);
49 root_layer->SetHasRenderSurface(true);
49 active_tree()->SetRootLayer(root_layer.Pass()); 50 active_tree()->SetRootLayer(root_layer.Pass());
50 } 51 }
51 52
52 LayerTreeImpl* active_tree() { return host_impl_->active_tree(); } 53 LayerTreeImpl* active_tree() { return host_impl_->active_tree(); }
53 54
54 void SetTestName(const std::string& name) { test_name_ = name; } 55 void SetTestName(const std::string& name) { test_name_ = name; }
55 56
56 void PrintResults() { 57 void PrintResults() {
57 CHECK(!test_name_.empty()) << "Must SetTestName() before AfterTest()."; 58 CHECK(!test_name_.empty()) << "Must SetTestName() before AfterTest().";
58 perf_test::PrintResult("occlusion_tracker_time", 59 perf_test::PrintResult("occlusion_tracker_time",
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 EXPECT_EQ(active_tree()->root_layer(), next.current_layer); 206 EXPECT_EQ(active_tree()->root_layer(), next.current_layer);
206 207
207 ++begin; 208 ++begin;
208 EXPECT_EQ(end, begin); 209 EXPECT_EQ(end, begin);
209 210
210 PrintResults(); 211 PrintResults();
211 } 212 }
212 213
213 } // namespace 214 } // namespace
214 } // namespace cc 215 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl_unittest.cc ('k') | cc/trees/occlusion_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698