Chromium Code Reviews| 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 2538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2549 const bool draw_transforms_match = | 2549 const bool draw_transforms_match = |
| 2550 ApproximatelyEqual(current_layer->draw_transform(), | 2550 ApproximatelyEqual(current_layer->draw_transform(), |
| 2551 current_layer->draw_transform_from_property_trees( | 2551 current_layer->draw_transform_from_property_trees( |
| 2552 inputs->property_trees->transform_tree)); | 2552 inputs->property_trees->transform_tree)); |
| 2553 CHECK(draw_transforms_match); | 2553 CHECK(draw_transforms_match); |
| 2554 | 2554 |
| 2555 const bool draw_opacities_match = | 2555 const bool draw_opacities_match = |
| 2556 current_layer->draw_opacity() == | 2556 current_layer->draw_opacity() == |
| 2557 current_layer->DrawOpacityFromPropertyTrees( | 2557 current_layer->DrawOpacityFromPropertyTrees( |
| 2558 inputs->property_trees->opacity_tree); | 2558 inputs->property_trees->opacity_tree); |
| 2559 CHECK(draw_opacities_match); | 2559 CHECK(draw_opacities_match) |
|
enne (OOO)
2015/04/17 20:04:21
<_<
| |
| 2560 << "expected: " << current_layer->draw_opacity() << " actual: " | |
| 2561 << current_layer->DrawOpacityFromPropertyTrees( | |
| 2562 inputs->property_trees->opacity_tree); | |
| 2560 } | 2563 } |
| 2561 } | 2564 } |
| 2562 | 2565 |
| 2563 // The dummy layer list should not have been used. | 2566 // The dummy layer list should not have been used. |
| 2564 DCHECK_EQ(0u, dummy_layer_list.size()); | 2567 DCHECK_EQ(0u, dummy_layer_list.size()); |
| 2565 // A root layer render_surface should always exist after | 2568 // A root layer render_surface should always exist after |
| 2566 // CalculateDrawProperties. | 2569 // CalculateDrawProperties. |
| 2567 DCHECK(inputs->root_layer->render_surface()); | 2570 DCHECK(inputs->root_layer->render_surface()); |
| 2568 } | 2571 } |
| 2569 | 2572 |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 2586 &accumulated_surface_state, | 2589 &accumulated_surface_state, |
| 2587 inputs->current_render_surface_layer_list_id); | 2590 inputs->current_render_surface_layer_list_id); |
| 2588 | 2591 |
| 2589 // The dummy layer list should not have been used. | 2592 // The dummy layer list should not have been used. |
| 2590 DCHECK_EQ(0u, dummy_layer_list.size()); | 2593 DCHECK_EQ(0u, dummy_layer_list.size()); |
| 2591 // A root layer render_surface should always exist after | 2594 // A root layer render_surface should always exist after |
| 2592 // CalculateDrawProperties. | 2595 // CalculateDrawProperties. |
| 2593 DCHECK(inputs->root_layer->render_surface()); | 2596 DCHECK(inputs->root_layer->render_surface()); |
| 2594 } | 2597 } |
| 2595 | 2598 |
| 2599 PropertyTrees* GetPropertyTrees(Layer* layer, | |
| 2600 PropertyTrees* trees_from_inputs) { | |
| 2601 return layer->layer_tree_host()->property_trees(); | |
| 2602 } | |
| 2603 | |
| 2604 PropertyTrees* GetPropertyTrees(LayerImpl* layer, | |
| 2605 PropertyTrees* trees_from_inputs) { | |
| 2606 return trees_from_inputs; | |
| 2607 } | |
| 2608 | |
| 2596 } // namespace cc | 2609 } // namespace cc |
| OLD | NEW |