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_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 802 // Create the render passes in dependency order. | 802 // Create the render passes in dependency order. |
| 803 size_t render_surface_layer_list_size = | 803 size_t render_surface_layer_list_size = |
| 804 frame->render_surface_layer_list->size(); | 804 frame->render_surface_layer_list->size(); |
| 805 for (size_t i = 0; i < render_surface_layer_list_size; ++i) { | 805 for (size_t i = 0; i < render_surface_layer_list_size; ++i) { |
| 806 size_t surface_index = render_surface_layer_list_size - 1 - i; | 806 size_t surface_index = render_surface_layer_list_size - 1 - i; |
| 807 LayerImpl* render_surface_layer = | 807 LayerImpl* render_surface_layer = |
| 808 (*frame->render_surface_layer_list)[surface_index]; | 808 (*frame->render_surface_layer_list)[surface_index]; |
| 809 RenderSurfaceImpl* render_surface = render_surface_layer->render_surface(); | 809 RenderSurfaceImpl* render_surface = render_surface_layer->render_surface(); |
| 810 | 810 |
| 811 bool should_draw_into_render_pass = | 811 bool should_draw_into_render_pass = |
| 812 render_surface_layer->parent() == NULL || | 812 render_surface_layer->layer_tree_impl()->IsRootLayer( |
|
ajuma
2016/03/23 23:27:28
You can directly use active_tree_ here instead of
jaydasika
2016/03/24 00:14:38
Done.
| |
| 813 render_surface_layer) || | |
| 813 render_surface->contributes_to_drawn_surface() || | 814 render_surface->contributes_to_drawn_surface() || |
| 814 render_surface_layer->HasCopyRequest(); | 815 render_surface_layer->HasCopyRequest(); |
| 815 if (should_draw_into_render_pass) | 816 if (should_draw_into_render_pass) |
| 816 render_surface->AppendRenderPasses(frame); | 817 render_surface->AppendRenderPasses(frame); |
| 817 } | 818 } |
| 818 | 819 |
| 819 // When we are displaying the HUD, change the root damage rect to cover the | 820 // When we are displaying the HUD, change the root damage rect to cover the |
| 820 // entire root surface. This will disable partial-swap/scissor optimizations | 821 // entire root surface. This will disable partial-swap/scissor optimizations |
| 821 // that would prevent the HUD from updating, since the HUD does not cause | 822 // that would prevent the HUD from updating, since the HUD does not cause |
| 822 // damage itself, to prevent it from messing with damage visualizations. Since | 823 // damage itself, to prevent it from messing with damage visualizations. Since |
| (...skipping 3099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3922 return task_runner_provider_->HasImplThread(); | 3923 return task_runner_provider_->HasImplThread(); |
| 3923 } | 3924 } |
| 3924 | 3925 |
| 3925 bool LayerTreeHostImpl::CommitToActiveTree() const { | 3926 bool LayerTreeHostImpl::CommitToActiveTree() const { |
| 3926 // In single threaded mode we skip the pending tree and commit directly to the | 3927 // In single threaded mode we skip the pending tree and commit directly to the |
| 3927 // active tree. | 3928 // active tree. |
| 3928 return !task_runner_provider_->HasImplThread(); | 3929 return !task_runner_provider_->HasImplThread(); |
| 3929 } | 3930 } |
| 3930 | 3931 |
| 3931 } // namespace cc | 3932 } // namespace cc |
| OLD | NEW |