| 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 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 DCHECK(frame->render_passes.empty()); | 766 DCHECK(frame->render_passes.empty()); |
| 767 DCHECK(CanDraw()); | 767 DCHECK(CanDraw()); |
| 768 DCHECK(!active_tree_->LayerListIsEmpty()); | 768 DCHECK(!active_tree_->LayerListIsEmpty()); |
| 769 | 769 |
| 770 TrackDamageForAllSurfaces(*frame->render_surface_layer_list); | 770 TrackDamageForAllSurfaces(*frame->render_surface_layer_list); |
| 771 | 771 |
| 772 // If the root render surface has no visible damage, then don't generate a | 772 // If the root render surface has no visible damage, then don't generate a |
| 773 // frame at all. | 773 // frame at all. |
| 774 RenderSurfaceImpl* root_surface = active_tree_->RootRenderSurface(); | 774 RenderSurfaceImpl* root_surface = active_tree_->RootRenderSurface(); |
| 775 bool root_surface_has_no_visible_damage = | 775 bool root_surface_has_no_visible_damage = |
| 776 !root_surface->damage_tracker()->current_damage_rect().Intersects( | 776 !root_surface->damage_tracker()->ShouldDamageEverything() && |
| 777 !root_surface->damage_tracker()->CurrentDamageRect().Intersects( |
| 777 root_surface->content_rect()); | 778 root_surface->content_rect()); |
| 778 bool root_surface_has_contributing_layers = | 779 bool root_surface_has_contributing_layers = |
| 779 !root_surface->layer_list().empty(); | 780 !root_surface->layer_list().empty(); |
| 780 bool hud_wants_to_draw_ = active_tree_->hud_layer() && | 781 bool hud_wants_to_draw_ = active_tree_->hud_layer() && |
| 781 active_tree_->hud_layer()->IsAnimatingHUDContents(); | 782 active_tree_->hud_layer()->IsAnimatingHUDContents(); |
| 782 bool must_always_swap = | 783 bool must_always_swap = |
| 783 compositor_frame_sink_->capabilities().must_always_swap; | 784 compositor_frame_sink_->capabilities().must_always_swap; |
| 784 if (root_surface_has_contributing_layers && | 785 if (root_surface_has_contributing_layers && |
| 785 root_surface_has_no_visible_damage && | 786 root_surface_has_no_visible_damage && |
| 786 !active_tree_->property_trees()->effect_tree.HasCopyRequests() && | 787 !active_tree_->property_trees()->effect_tree.HasCopyRequests() && |
| (...skipping 3298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4085 worker_context_visibility_ = | 4086 worker_context_visibility_ = |
| 4086 worker_context->CacheController()->ClientBecameVisible(); | 4087 worker_context->CacheController()->ClientBecameVisible(); |
| 4087 } else { | 4088 } else { |
| 4088 worker_context->CacheController()->ClientBecameNotVisible( | 4089 worker_context->CacheController()->ClientBecameNotVisible( |
| 4089 std::move(worker_context_visibility_)); | 4090 std::move(worker_context_visibility_)); |
| 4090 } | 4091 } |
| 4091 } | 4092 } |
| 4092 } | 4093 } |
| 4093 | 4094 |
| 4094 } // namespace cc | 4095 } // namespace cc |
| OLD | NEW |