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

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

Issue 634083002: gpu: Compositor management of GpuMemoryBuffer instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cc-pre-chromium-image-refactor
Patch Set: rebase Created 6 years, 2 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_host_unittest_scroll.cc ('k') | cc/trees/tree_synchronizer_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 18 matching lines...) Expand all
29 class OcclusionTrackerPerfTest : public testing::Test { 29 class OcclusionTrackerPerfTest : public testing::Test {
30 public: 30 public:
31 OcclusionTrackerPerfTest() 31 OcclusionTrackerPerfTest()
32 : timer_(kWarmupRuns, 32 : timer_(kWarmupRuns,
33 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), 33 base::TimeDelta::FromMilliseconds(kTimeLimitMillis),
34 kTimeCheckInterval), 34 kTimeCheckInterval),
35 impl_(&proxy_) {} 35 impl_(&proxy_) {}
36 void CreateHost() { 36 void CreateHost() {
37 LayerTreeSettings settings; 37 LayerTreeSettings settings;
38 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); 38 shared_bitmap_manager_.reset(new TestSharedBitmapManager());
39 host_impl_ = LayerTreeHostImpl::Create( 39 host_impl_ = LayerTreeHostImpl::Create(settings,
40 settings, &client_, &proxy_, &stats_, shared_bitmap_manager_.get(), 1); 40 &client_,
41 &proxy_,
42 &stats_,
43 shared_bitmap_manager_.get(),
44 NULL,
45 1);
41 host_impl_->InitializeRenderer(FakeOutputSurface::Create3d()); 46 host_impl_->InitializeRenderer(FakeOutputSurface::Create3d());
42 47
43 scoped_ptr<LayerImpl> root_layer = LayerImpl::Create(active_tree(), 1); 48 scoped_ptr<LayerImpl> root_layer = LayerImpl::Create(active_tree(), 1);
44 active_tree()->SetRootLayer(root_layer.Pass()); 49 active_tree()->SetRootLayer(root_layer.Pass());
45 } 50 }
46 51
47 LayerTreeImpl* active_tree() { return host_impl_->active_tree(); } 52 LayerTreeImpl* active_tree() { return host_impl_->active_tree(); }
48 53
49 void SetTestName(const std::string& name) { test_name_ = name; } 54 void SetTestName(const std::string& name) { test_name_ = name; }
50 55
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 EXPECT_EQ(active_tree()->root_layer(), next.current_layer); 205 EXPECT_EQ(active_tree()->root_layer(), next.current_layer);
201 206
202 ++begin; 207 ++begin;
203 EXPECT_EQ(end, begin); 208 EXPECT_EQ(end, begin);
204 209
205 PrintResults(); 210 PrintResults();
206 } 211 }
207 212
208 } // namespace 213 } // namespace
209 } // namespace cc 214 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_scroll.cc ('k') | cc/trees/tree_synchronizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698