OLD | NEW |
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 Loading... |
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 |
OLD | NEW |