| 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/occlusion_tracker.h" | 5 #include "cc/occlusion_tracker.h" |
| 6 | 6 |
| 7 #include "cc/layer.h" | 7 #include "cc/layer.h" |
| 8 #include "cc/layer_animation_controller.h" | 8 #include "cc/layer_animation_controller.h" |
| 9 #include "cc/layer_impl.h" | 9 #include "cc/layer_impl.h" |
| 10 #include "cc/layer_tree_host_common.h" | 10 #include "cc/layer_tree_host_common.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 } | 274 } |
| 275 | 275 |
| 276 void calcDrawEtc(TestContentLayerImpl* root) | 276 void calcDrawEtc(TestContentLayerImpl* root) |
| 277 { | 277 { |
| 278 DCHECK(root == m_root.get()); | 278 DCHECK(root == m_root.get()); |
| 279 int dummyMaxTextureSize = 512; | 279 int dummyMaxTextureSize = 512; |
| 280 LayerSorter layerSorter; | 280 LayerSorter layerSorter; |
| 281 | 281 |
| 282 DCHECK(!root->renderSurface()); | 282 DCHECK(!root->renderSurface()); |
| 283 | 283 |
| 284 LayerTreeHostCommon::calculateDrawTransforms(root, root->bounds(), 1, 1,
&layerSorter, dummyMaxTextureSize, m_renderSurfaceLayerListImpl); | 284 LayerTreeHostCommon::calculateDrawTransforms(root, root->bounds(), 1, 1,
&layerSorter, dummyMaxTextureSize, false, m_renderSurfaceLayerListImpl); |
| 285 | 285 |
| 286 m_layerIterator = m_layerIteratorBegin = Types::TestLayerIterator::begin
(&m_renderSurfaceLayerListImpl); | 286 m_layerIterator = m_layerIteratorBegin = Types::TestLayerIterator::begin
(&m_renderSurfaceLayerListImpl); |
| 287 } | 287 } |
| 288 | 288 |
| 289 void calcDrawEtc(TestContentLayer* root) | 289 void calcDrawEtc(TestContentLayer* root) |
| 290 { | 290 { |
| 291 DCHECK(root == m_root.get()); | 291 DCHECK(root == m_root.get()); |
| 292 int dummyMaxTextureSize = 512; | 292 int dummyMaxTextureSize = 512; |
| 293 | 293 |
| 294 DCHECK(!root->renderSurface()); | 294 DCHECK(!root->renderSurface()); |
| 295 | 295 |
| 296 LayerTreeHostCommon::calculateDrawTransforms(root, root->bounds(), 1, 1,
dummyMaxTextureSize, m_renderSurfaceLayerList); | 296 LayerTreeHostCommon::calculateDrawTransforms(root, root->bounds(), 1, 1,
dummyMaxTextureSize, false, m_renderSurfaceLayerList); |
| 297 | 297 |
| 298 m_layerIterator = m_layerIteratorBegin = Types::TestLayerIterator::begin
(&m_renderSurfaceLayerList); | 298 m_layerIterator = m_layerIteratorBegin = Types::TestLayerIterator::begin
(&m_renderSurfaceLayerList); |
| 299 } | 299 } |
| 300 | 300 |
| 301 void enterLayer(typename Types::LayerType* layer, typename Types::OcclusionT
rackerType& occlusion) | 301 void enterLayer(typename Types::LayerType* layer, typename Types::OcclusionT
rackerType& occlusion) |
| 302 { | 302 { |
| 303 ASSERT_EQ(layer, *m_layerIterator); | 303 ASSERT_EQ(layer, *m_layerIterator); |
| 304 ASSERT_TRUE(m_layerIterator.representsItself()); | 304 ASSERT_TRUE(m_layerIterator.representsItself()); |
| 305 occlusion.enterLayer(m_layerIterator); | 305 occlusion.enterLayer(m_layerIterator); |
| 306 } | 306 } |
| (...skipping 2765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3072 | 3072 |
| 3073 EXPECT_EQ(gfx::Rect(gfx::Point(), trackingSize).ToString(), occlusion.oc
clusionInScreenSpace().ToString()); | 3073 EXPECT_EQ(gfx::Rect(gfx::Point(), trackingSize).ToString(), occlusion.oc
clusionInScreenSpace().ToString()); |
| 3074 EXPECT_EQ(gfx::Rect(gfx::Point(), trackingSize).ToString(), occlusion.oc
clusionInTargetSurface().ToString()); | 3074 EXPECT_EQ(gfx::Rect(gfx::Point(), trackingSize).ToString(), occlusion.oc
clusionInTargetSurface().ToString()); |
| 3075 } | 3075 } |
| 3076 }; | 3076 }; |
| 3077 | 3077 |
| 3078 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestMinimumTrackingSize); | 3078 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestMinimumTrackingSize); |
| 3079 | 3079 |
| 3080 } // namespace | 3080 } // namespace |
| 3081 } // namespace cc | 3081 } // namespace cc |
| OLD | NEW |