OLD | NEW |
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/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
(...skipping 2478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2489 CalcDrawPropsMainInputs* inputs) { | 2489 CalcDrawPropsMainInputs* inputs) { |
2490 UpdateRenderSurfaces(inputs->root_layer, | 2490 UpdateRenderSurfaces(inputs->root_layer, |
2491 inputs->can_render_to_separate_surface, gfx::Transform(), | 2491 inputs->can_render_to_separate_surface, gfx::Transform(), |
2492 false); | 2492 false); |
2493 LayerList dummy_layer_list; | 2493 LayerList dummy_layer_list; |
2494 SubtreeGlobals<Layer> globals; | 2494 SubtreeGlobals<Layer> globals; |
2495 DataForRecursion<Layer> data_for_recursion; | 2495 DataForRecursion<Layer> data_for_recursion; |
2496 ProcessCalcDrawPropsInputs(*inputs, &globals, &data_for_recursion); | 2496 ProcessCalcDrawPropsInputs(*inputs, &globals, &data_for_recursion); |
2497 | 2497 |
2498 PreCalculateMetaInformationRecursiveData recursive_data; | 2498 PreCalculateMetaInformationRecursiveData recursive_data; |
| 2499 PreCalculateMetaInformation(inputs->root_layer, &recursive_data); |
2499 | 2500 |
2500 if (!inputs->verify_property_trees) { | 2501 if (!inputs->verify_property_trees) { |
2501 PreCalculateMetaInformation(inputs->root_layer, &recursive_data); | |
2502 std::vector<AccumulatedSurfaceState<Layer>> accumulated_surface_state; | 2502 std::vector<AccumulatedSurfaceState<Layer>> accumulated_surface_state; |
2503 CalculateDrawPropertiesInternal<Layer>( | 2503 CalculateDrawPropertiesInternal<Layer>( |
2504 inputs->root_layer, globals, data_for_recursion, | 2504 inputs->root_layer, globals, data_for_recursion, |
2505 inputs->render_surface_layer_list, &dummy_layer_list, | 2505 inputs->render_surface_layer_list, &dummy_layer_list, |
2506 &accumulated_surface_state, | 2506 &accumulated_surface_state, |
2507 inputs->current_render_surface_layer_list_id); | 2507 inputs->current_render_surface_layer_list_id); |
2508 } else { | 2508 } else { |
2509 { | 2509 { |
2510 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("cc.debug.cdp-perf"), | 2510 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("cc.debug.cdp-perf"), |
2511 "LayerTreeHostCommon::CalculateDrawProperties"); | 2511 "LayerTreeHostCommon::CalculateDrawProperties"); |
2512 PreCalculateMetaInformation(inputs->root_layer, &recursive_data); | |
2513 std::vector<AccumulatedSurfaceState<Layer>> accumulated_surface_state; | 2512 std::vector<AccumulatedSurfaceState<Layer>> accumulated_surface_state; |
2514 CalculateDrawPropertiesInternal<Layer>( | 2513 CalculateDrawPropertiesInternal<Layer>( |
2515 inputs->root_layer, globals, data_for_recursion, | 2514 inputs->root_layer, globals, data_for_recursion, |
2516 inputs->render_surface_layer_list, &dummy_layer_list, | 2515 inputs->render_surface_layer_list, &dummy_layer_list, |
2517 &accumulated_surface_state, | 2516 &accumulated_surface_state, |
2518 inputs->current_render_surface_layer_list_id); | 2517 inputs->current_render_surface_layer_list_id); |
2519 } | 2518 } |
2520 | 2519 |
2521 // The translation from layer to property trees is an intermediate state. We | 2520 // The translation from layer to property trees is an intermediate state. We |
2522 // will eventually get these data passed directly to the compositor. | 2521 // will eventually get these data passed directly to the compositor. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2587 inputs->current_render_surface_layer_list_id); | 2586 inputs->current_render_surface_layer_list_id); |
2588 | 2587 |
2589 // The dummy layer list should not have been used. | 2588 // The dummy layer list should not have been used. |
2590 DCHECK_EQ(0u, dummy_layer_list.size()); | 2589 DCHECK_EQ(0u, dummy_layer_list.size()); |
2591 // A root layer render_surface should always exist after | 2590 // A root layer render_surface should always exist after |
2592 // CalculateDrawProperties. | 2591 // CalculateDrawProperties. |
2593 DCHECK(inputs->root_layer->render_surface()); | 2592 DCHECK(inputs->root_layer->render_surface()); |
2594 } | 2593 } |
2595 | 2594 |
2596 } // namespace cc | 2595 } // namespace cc |
OLD | NEW |