Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: cc/occlusion_tracker_unittest.cc

Issue 11360093: Mark layers that can use LCD text based on layer transform and opacity. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed compile error Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/occlusion_tracker.h" 7 #include "cc/occlusion_tracker.h"
8 8
9 #include "cc/layer.h" 9 #include "cc/layer.h"
10 #include "cc/layer_animation_controller.h" 10 #include "cc/layer_animation_controller.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 } 276 }
277 277
278 void calcDrawEtc(TestContentLayerImpl* root) 278 void calcDrawEtc(TestContentLayerImpl* root)
279 { 279 {
280 DCHECK(root == m_root.get()); 280 DCHECK(root == m_root.get());
281 int dummyMaxTextureSize = 512; 281 int dummyMaxTextureSize = 512;
282 LayerSorter layerSorter; 282 LayerSorter layerSorter;
283 283
284 DCHECK(!root->renderSurface()); 284 DCHECK(!root->renderSurface());
285 285
286 LayerTreeHostCommon::calculateDrawTransforms(root, root->bounds(), 1, 1, &layerSorter, dummyMaxTextureSize, m_renderSurfaceLayerListImpl); 286 LayerTreeHostCommon::calculateDrawTransforms(root, root->bounds(), 1, 1, &layerSorter, dummyMaxTextureSize, false, m_renderSurfaceLayerListImpl);
287 287
288 m_layerIterator = m_layerIteratorBegin = Types::TestLayerIterator::begin (&m_renderSurfaceLayerListImpl); 288 m_layerIterator = m_layerIteratorBegin = Types::TestLayerIterator::begin (&m_renderSurfaceLayerListImpl);
289 } 289 }
290 290
291 void calcDrawEtc(TestContentLayer* root) 291 void calcDrawEtc(TestContentLayer* root)
292 { 292 {
293 DCHECK(root == m_root.get()); 293 DCHECK(root == m_root.get());
294 int dummyMaxTextureSize = 512; 294 int dummyMaxTextureSize = 512;
295 295
296 DCHECK(!root->renderSurface()); 296 DCHECK(!root->renderSurface());
297 297
298 LayerTreeHostCommon::calculateDrawTransforms(root, root->bounds(), 1, 1, dummyMaxTextureSize, m_renderSurfaceLayerList); 298 LayerTreeHostCommon::calculateDrawTransforms(root, root->bounds(), 1, 1, dummyMaxTextureSize, false, m_renderSurfaceLayerList);
299 299
300 m_layerIterator = m_layerIteratorBegin = Types::TestLayerIterator::begin (&m_renderSurfaceLayerList); 300 m_layerIterator = m_layerIteratorBegin = Types::TestLayerIterator::begin (&m_renderSurfaceLayerList);
301 } 301 }
302 302
303 void enterLayer(typename Types::LayerType* layer, typename Types::OcclusionT rackerType& occlusion) 303 void enterLayer(typename Types::LayerType* layer, typename Types::OcclusionT rackerType& occlusion)
304 { 304 {
305 ASSERT_EQ(layer, *m_layerIterator); 305 ASSERT_EQ(layer, *m_layerIterator);
306 ASSERT_TRUE(m_layerIterator.representsItself()); 306 ASSERT_TRUE(m_layerIterator.representsItself());
307 occlusion.enterLayer(m_layerIterator); 307 occlusion.enterLayer(m_layerIterator);
308 } 308 }
(...skipping 2764 matching lines...) Expand 10 before | Expand all | Expand 10 after
3073 this->visitLayer(large, occlusion); 3073 this->visitLayer(large, occlusion);
3074 3074
3075 EXPECT_EQ(gfx::Rect(gfx::Point(), trackingSize).ToString(), occlusion.oc clusionInScreenSpace().ToString()); 3075 EXPECT_EQ(gfx::Rect(gfx::Point(), trackingSize).ToString(), occlusion.oc clusionInScreenSpace().ToString());
3076 EXPECT_EQ(gfx::Rect(gfx::Point(), trackingSize).ToString(), occlusion.oc clusionInTargetSurface().ToString()); 3076 EXPECT_EQ(gfx::Rect(gfx::Point(), trackingSize).ToString(), occlusion.oc clusionInTargetSurface().ToString());
3077 } 3077 }
3078 }; 3078 };
3079 3079
3080 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestMinimumTrackingSize); 3080 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestMinimumTrackingSize);
3081 3081
3082 } // anonymous namespace 3082 } // anonymous namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698