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 <public/WebFilterOperation.h> | 7 #include <public/WebFilterOperation.h> |
8 #include <public/WebFilterOperations.h> | 8 #include <public/WebFilterOperations.h> |
9 | 9 |
10 #include "cc/layer.h" | 10 #include "cc/layer.h" |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 return layer; | 286 return layer; |
287 } | 287 } |
288 | 288 |
289 void calcDrawEtc(TestContentLayerImpl* root) | 289 void calcDrawEtc(TestContentLayerImpl* 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::calculateDrawProperties(root, root->bounds(), 1, 1,
dummyMaxTextureSize, m_renderSurfaceLayerListImpl); | 296 LayerTreeHostCommon::calculateDrawProperties(root, root->bounds(), 1, 1,
dummyMaxTextureSize, false, m_renderSurfaceLayerListImpl); |
297 | 297 |
298 m_layerIterator = m_layerIteratorBegin = Types::TestLayerIterator::begin
(&m_renderSurfaceLayerListImpl); | 298 m_layerIterator = m_layerIteratorBegin = Types::TestLayerIterator::begin
(&m_renderSurfaceLayerListImpl); |
299 } | 299 } |
300 | 300 |
301 void calcDrawEtc(TestContentLayer* root) | 301 void calcDrawEtc(TestContentLayer* root) |
302 { | 302 { |
303 DCHECK(root == m_root.get()); | 303 DCHECK(root == m_root.get()); |
304 int dummyMaxTextureSize = 512; | 304 int dummyMaxTextureSize = 512; |
305 | 305 |
306 DCHECK(!root->renderSurface()); | 306 DCHECK(!root->renderSurface()); |
307 | 307 |
308 LayerTreeHostCommon::calculateDrawProperties(root, root->bounds(), 1, 1,
dummyMaxTextureSize, m_renderSurfaceLayerList); | 308 LayerTreeHostCommon::calculateDrawProperties(root, root->bounds(), 1, 1,
dummyMaxTextureSize, false, m_renderSurfaceLayerList); |
309 | 309 |
310 m_layerIterator = m_layerIteratorBegin = Types::TestLayerIterator::begin
(&m_renderSurfaceLayerList); | 310 m_layerIterator = m_layerIteratorBegin = Types::TestLayerIterator::begin
(&m_renderSurfaceLayerList); |
311 } | 311 } |
312 | 312 |
313 void enterLayer(typename Types::LayerType* layer, typename Types::OcclusionT
rackerType& occlusion) | 313 void enterLayer(typename Types::LayerType* layer, typename Types::OcclusionT
rackerType& occlusion) |
314 { | 314 { |
315 ASSERT_EQ(layer, *m_layerIterator); | 315 ASSERT_EQ(layer, *m_layerIterator); |
316 ASSERT_TRUE(m_layerIterator.representsItself()); | 316 ASSERT_TRUE(m_layerIterator.representsItself()); |
317 occlusion.enterLayer(m_layerIterator); | 317 occlusion.enterLayer(m_layerIterator); |
318 } | 318 } |
(...skipping 2779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3098 | 3098 |
3099 EXPECT_EQ(gfx::Rect(gfx::Point(), trackingSize).ToString(), occlusion.oc
clusionInScreenSpace().ToString()); | 3099 EXPECT_EQ(gfx::Rect(gfx::Point(), trackingSize).ToString(), occlusion.oc
clusionInScreenSpace().ToString()); |
3100 EXPECT_EQ(gfx::Rect(gfx::Point(), trackingSize).ToString(), occlusion.oc
clusionInTargetSurface().ToString()); | 3100 EXPECT_EQ(gfx::Rect(gfx::Point(), trackingSize).ToString(), occlusion.oc
clusionInTargetSurface().ToString()); |
3101 } | 3101 } |
3102 }; | 3102 }; |
3103 | 3103 |
3104 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestMinimumTrackingSize); | 3104 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestMinimumTrackingSize); |
3105 | 3105 |
3106 } // namespace | 3106 } // namespace |
3107 } // namespace cc | 3107 } // namespace cc |
OLD | NEW |