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