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

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

Issue 12426024: cc: Switch RenderingStats collection in Layer::Update() to RenderingStatsInstrumentation (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 190965 Created 7 years, 8 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.cc ('k') | cc/trees/single_thread_proxy.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "cc/layers/layer.h" 7 #include "cc/layers/layer.h"
8 #include "cc/test/layer_tree_test.h" 8 #include "cc/test/layer_tree_test.h"
9 #include "cc/test/occlusion_tracker_test_common.h" 9 #include "cc/test/occlusion_tracker_test_common.h"
10 10
11 namespace cc { 11 namespace cc {
12 namespace { 12 namespace {
13 13
14 class TestLayer : public Layer { 14 class TestLayer : public Layer {
15 public: 15 public:
16 static scoped_refptr<TestLayer> Create() { 16 static scoped_refptr<TestLayer> Create() {
17 return make_scoped_refptr(new TestLayer()); 17 return make_scoped_refptr(new TestLayer());
18 } 18 }
19 19
20 virtual void Update( 20 virtual void Update(
21 ResourceUpdateQueue* update_queue, 21 ResourceUpdateQueue* update_queue,
22 const OcclusionTracker* occlusion, 22 const OcclusionTracker* occlusion) OVERRIDE {
23 RenderingStats* stats) OVERRIDE {
24 if (!occlusion) 23 if (!occlusion)
25 return; 24 return;
26 25
27 // Gain access to internals of the OcclusionTracker. 26 // Gain access to internals of the OcclusionTracker.
28 const TestOcclusionTracker* test_occlusion = 27 const TestOcclusionTracker* test_occlusion =
29 static_cast<const TestOcclusionTracker*>(occlusion); 28 static_cast<const TestOcclusionTracker*>(occlusion);
30 occlusion_ = UnionRegions( 29 occlusion_ = UnionRegions(
31 test_occlusion->occlusion_from_inside_target(), 30 test_occlusion->occlusion_from_inside_target(),
32 test_occlusion->occlusion_from_outside_target()); 31 test_occlusion->occlusion_from_outside_target());
33 } 32 }
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 466
468 layer_tree_host()->SetRootLayer(layers[0]); 467 layer_tree_host()->SetRootLayer(layers[0]);
469 LayerTreeTest::SetupTree(); 468 LayerTreeTest::SetupTree();
470 } 469 }
471 }; 470 };
472 471
473 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostOcclusionTestManySurfaces) 472 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostOcclusionTestManySurfaces)
474 473
475 } // namespace 474 } // namespace
476 } // namespace cc 475 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/single_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698