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

Side by Side Diff: cc/trees/occlusion_tracker_unittest.cc

Issue 12259027: cc: Simplify the logic for deciding to update tile priorities. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add early-out and unit test Created 7 years, 7 months 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 "cc/trees/occlusion_tracker.h" 5 #include "cc/trees/occlusion_tracker.h"
6 6
7 #include "cc/animation/layer_animation_controller.h" 7 #include "cc/animation/layer_animation_controller.h"
8 #include "cc/base/math_util.h" 8 #include "cc/base/math_util.h"
9 #include "cc/debug/overdraw_metrics.h" 9 #include "cc/debug/overdraw_metrics.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 DCHECK(!root->render_surface()); 314 DCHECK(!root->render_surface());
315 315
316 LayerTreeHostCommon::CalculateDrawProperties( 316 LayerTreeHostCommon::CalculateDrawProperties(
317 root, 317 root,
318 root->bounds(), 318 root->bounds(),
319 1.f, 319 1.f,
320 1.f, 320 1.f,
321 NULL, 321 NULL,
322 dummy_max_texture_size, 322 dummy_max_texture_size,
323 false, 323 false,
324 &render_surface_layer_list_impl_, 324 &render_surface_layer_list_impl_);
325 false);
326 325
327 layer_iterator_ = layer_iterator_begin_ = 326 layer_iterator_ = layer_iterator_begin_ =
328 Types::TestLayerIterator::Begin(&render_surface_layer_list_impl_); 327 Types::TestLayerIterator::Begin(&render_surface_layer_list_impl_);
329 } 328 }
330 329
331 void CalcDrawEtc(TestContentLayer* root) { 330 void CalcDrawEtc(TestContentLayer* root) {
332 DCHECK(root == root_.get()); 331 DCHECK(root == root_.get());
333 int dummy_max_texture_size = 512; 332 int dummy_max_texture_size = 512;
334 333
335 DCHECK(!root->render_surface()); 334 DCHECK(!root->render_surface());
(...skipping 4471 matching lines...) Expand 10 before | Expand all | Expand 10 after
4807 occlusion.occlusion_from_outside_target().ToString()); 4806 occlusion.occlusion_from_outside_target().ToString());
4808 EXPECT_EQ(gfx::Rect(10, 10, 50, 50).ToString(), 4807 EXPECT_EQ(gfx::Rect(10, 10, 50, 50).ToString(),
4809 occlusion.occlusion_from_inside_target().ToString()); 4808 occlusion.occlusion_from_inside_target().ToString());
4810 } 4809 }
4811 }; 4810 };
4812 4811
4813 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestScaledLayerInSurfaceIsClipped) 4812 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestScaledLayerInSurfaceIsClipped)
4814 4813
4815 } // namespace 4814 } // namespace
4816 } // namespace cc 4815 } // namespace cc
OLDNEW
« cc/resources/picture_layer_tiling.cc ('K') | « cc/trees/layer_tree_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698