| 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 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 830 LayerImpl* render_surface_layer = | 830 LayerImpl* render_surface_layer = |
| 831 (*frame->render_surface_layer_list)[surface_index]; | 831 (*frame->render_surface_layer_list)[surface_index]; |
| 832 RenderSurfaceImpl* render_surface = | 832 RenderSurfaceImpl* render_surface = |
| 833 render_surface_layer->GetRenderSurface(); | 833 render_surface_layer->GetRenderSurface(); |
| 834 | 834 |
| 835 bool should_draw_into_render_pass = | 835 bool should_draw_into_render_pass = |
| 836 active_tree_->IsRootLayer(render_surface_layer) || | 836 active_tree_->IsRootLayer(render_surface_layer) || |
| 837 render_surface->contributes_to_drawn_surface() || | 837 render_surface->contributes_to_drawn_surface() || |
| 838 render_surface->HasCopyRequest(); | 838 render_surface->HasCopyRequest(); |
| 839 if (should_draw_into_render_pass) | 839 if (should_draw_into_render_pass) |
| 840 render_surface->AppendRenderPasses(frame); | 840 render_surface->AppendRenderPass(frame); |
| 841 } | 841 } |
| 842 | 842 |
| 843 // Damage rects for non-root passes aren't meaningful, so set them to be | 843 // Damage rects for non-root passes aren't meaningful, so set them to be |
| 844 // equal to the output rect. | 844 // equal to the output rect. |
| 845 for (size_t i = 0; i + 1 < frame->render_passes.size(); ++i) { | 845 for (size_t i = 0; i + 1 < frame->render_passes.size(); ++i) { |
| 846 RenderPass* pass = frame->render_passes[i].get(); | 846 RenderPass* pass = frame->render_passes[i].get(); |
| 847 pass->damage_rect = pass->output_rect; | 847 pass->damage_rect = pass->output_rect; |
| 848 } | 848 } |
| 849 | 849 |
| 850 // When we are displaying the HUD, change the root damage rect to cover the | 850 // When we are displaying the HUD, change the root damage rect to cover the |
| (...skipping 3331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4182 worker_context_visibility_ = | 4182 worker_context_visibility_ = |
| 4183 worker_context->CacheController()->ClientBecameVisible(); | 4183 worker_context->CacheController()->ClientBecameVisible(); |
| 4184 } else { | 4184 } else { |
| 4185 worker_context->CacheController()->ClientBecameNotVisible( | 4185 worker_context->CacheController()->ClientBecameNotVisible( |
| 4186 std::move(worker_context_visibility_)); | 4186 std::move(worker_context_visibility_)); |
| 4187 } | 4187 } |
| 4188 } | 4188 } |
| 4189 } | 4189 } |
| 4190 | 4190 |
| 4191 } // namespace cc | 4191 } // namespace cc |
| OLD | NEW |