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

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

Issue 687873004: Introduce Property Trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wip-awoloszyn2
Patch Set: . Created 6 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
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layer_tree_host_common.h" 5 #include "cc/trees/layer_tree_host_common.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 2400 matching lines...) Expand 10 before | Expand all | Expand 10 after
2411 &accumulated_surface_state, 2411 &accumulated_surface_state,
2412 inputs->current_render_surface_layer_list_id); 2412 inputs->current_render_surface_layer_list_id);
2413 2413
2414 // The dummy layer list should not have been used. 2414 // The dummy layer list should not have been used.
2415 DCHECK_EQ(0u, dummy_layer_list.size()); 2415 DCHECK_EQ(0u, dummy_layer_list.size());
2416 // A root layer render_surface should always exist after 2416 // A root layer render_surface should always exist after
2417 // CalculateDrawProperties. 2417 // CalculateDrawProperties.
2418 DCHECK(inputs->root_layer->render_surface()); 2418 DCHECK(inputs->root_layer->render_surface());
2419 2419
2420 // Now compare with the new approach. 2420 // Now compare with the new approach.
2421 OpacityTree opacity_tree; 2421 // TODO(ajuma): Can we efficiently cache some of this rather than
2422 TransformTree transform_tree; 2422 // starting from scratch every frame?
2423 ClipTree clip_tree; 2423 OpacityTree opacity_tree(inputs->root_layer);
2424 TransformTree transform_tree(inputs->root_layer);
2425 ClipTree clip_tree(inputs->root_layer);
2424 ComputeVisibleRectsUsingPropertyTrees(inputs->root_layer, 2426 ComputeVisibleRectsUsingPropertyTrees(inputs->root_layer,
2425 inputs->page_scale_application_layer, 2427 inputs->page_scale_application_layer,
2426 inputs->page_scale_factor, 2428 inputs->page_scale_factor,
2427 inputs->device_scale_factor, 2429 inputs->device_scale_factor,
2428 gfx::Rect(inputs->device_viewport_size), 2430 gfx::Rect(inputs->device_viewport_size),
2429 inputs->device_transform, 2431 inputs->device_transform,
2430 &opacity_tree, 2432 &opacity_tree,
2431 &transform_tree, 2433 &transform_tree,
2432 &clip_tree); 2434 &clip_tree);
2433 2435
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
2516 inputs->current_render_surface_layer_list_id); 2518 inputs->current_render_surface_layer_list_id);
2517 2519
2518 // The dummy layer list should not have been used. 2520 // The dummy layer list should not have been used.
2519 DCHECK_EQ(0u, dummy_layer_list.size()); 2521 DCHECK_EQ(0u, dummy_layer_list.size());
2520 // A root layer render_surface should always exist after 2522 // A root layer render_surface should always exist after
2521 // CalculateDrawProperties. 2523 // CalculateDrawProperties.
2522 DCHECK(inputs->root_layer->render_surface()); 2524 DCHECK(inputs->root_layer->render_surface());
2523 } 2525 }
2524 2526
2525 } // namespace cc 2527 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698