| 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/layer_tree_host.h" | 5 #include "cc/layer_tree_host.h" |
| 6 | 6 |
| 7 #include "cc/layer.h" | 7 #include "cc/layer.h" |
| 8 #include "cc/test/layer_tree_test_common.h" | 8 #include "cc/test/layer_tree_test_common.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, |
| 23 RenderingStats& stats) OVERRIDE { | 23 RenderingStats* stats) OVERRIDE { |
| 24 if (!occlusion) | 24 if (!occlusion) |
| 25 return; | 25 return; |
| 26 | 26 |
| 27 // Gain access to internals of the OcclusionTracker. | 27 // Gain access to internals of the OcclusionTracker. |
| 28 const TestOcclusionTracker* test_occlusion = | 28 const TestOcclusionTracker* test_occlusion = |
| 29 static_cast<const TestOcclusionTracker*>(occlusion); | 29 static_cast<const TestOcclusionTracker*>(occlusion); |
| 30 occlusion_ = UnionRegions( | 30 occlusion_ = UnionRegions( |
| 31 test_occlusion->occlusionFromInsideTarget(), | 31 test_occlusion->occlusionFromInsideTarget(), |
| 32 test_occlusion->occlusionFromOutsideTarget()); | 32 test_occlusion->occlusionFromOutsideTarget()); |
| 33 } | 33 } |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 | 467 |
| 468 m_layerTreeHost->setRootLayer(layers[0].get()); | 468 m_layerTreeHost->setRootLayer(layers[0].get()); |
| 469 ThreadedTest::setupTree(); | 469 ThreadedTest::setupTree(); |
| 470 } | 470 } |
| 471 }; | 471 }; |
| 472 | 472 |
| 473 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostOcclusionTestManySurfaces) | 473 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostOcclusionTestManySurfaces) |
| 474 | 474 |
| 475 } // namespace | 475 } // namespace |
| 476 } // namespace cc | 476 } // namespace cc |
| OLD | NEW |