| 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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 DCHECK(frame->render_passes.empty()); | 775 DCHECK(frame->render_passes.empty()); |
| 776 DCHECK(CanDraw()); | 776 DCHECK(CanDraw()); |
| 777 DCHECK(!active_tree_->LayerListIsEmpty()); | 777 DCHECK(!active_tree_->LayerListIsEmpty()); |
| 778 | 778 |
| 779 TrackDamageForAllSurfaces(*frame->render_surface_layer_list); | 779 TrackDamageForAllSurfaces(*frame->render_surface_layer_list); |
| 780 | 780 |
| 781 // If the root render surface has no visible damage, then don't generate a | 781 // If the root render surface has no visible damage, then don't generate a |
| 782 // frame at all. | 782 // frame at all. |
| 783 RenderSurfaceImpl* root_surface = active_tree_->RootRenderSurface(); | 783 RenderSurfaceImpl* root_surface = active_tree_->RootRenderSurface(); |
| 784 bool root_surface_has_no_visible_damage = | 784 bool root_surface_has_no_visible_damage = |
| 785 !root_surface->damage_tracker()->current_damage_rect().Intersects( | 785 !root_surface->GetDamageRect().Intersects(root_surface->content_rect()); |
| 786 root_surface->content_rect()); | |
| 787 bool root_surface_has_contributing_layers = | 786 bool root_surface_has_contributing_layers = |
| 788 !root_surface->layer_list().empty(); | 787 !root_surface->layer_list().empty(); |
| 789 bool hud_wants_to_draw_ = active_tree_->hud_layer() && | 788 bool hud_wants_to_draw_ = active_tree_->hud_layer() && |
| 790 active_tree_->hud_layer()->IsAnimatingHUDContents(); | 789 active_tree_->hud_layer()->IsAnimatingHUDContents(); |
| 791 bool resources_must_be_resent = | 790 bool resources_must_be_resent = |
| 792 compositor_frame_sink_->capabilities().can_force_reclaim_resources; | 791 compositor_frame_sink_->capabilities().can_force_reclaim_resources; |
| 793 // When touch handle visibility changes there is no visible damage | 792 // When touch handle visibility changes there is no visible damage |
| 794 // because touch handles are composited in the browser. However we | 793 // because touch handles are composited in the browser. However we |
| 795 // still want the browser to be notified that the handles changed | 794 // still want the browser to be notified that the handles changed |
| 796 // through the |ViewHostMsg_SwapCompositorFrame| IPC so we keep | 795 // through the |ViewHostMsg_SwapCompositorFrame| IPC so we keep |
| (...skipping 3303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4100 worker_context_visibility_ = | 4099 worker_context_visibility_ = |
| 4101 worker_context->CacheController()->ClientBecameVisible(); | 4100 worker_context->CacheController()->ClientBecameVisible(); |
| 4102 } else { | 4101 } else { |
| 4103 worker_context->CacheController()->ClientBecameNotVisible( | 4102 worker_context->CacheController()->ClientBecameNotVisible( |
| 4104 std::move(worker_context_visibility_)); | 4103 std::move(worker_context_visibility_)); |
| 4105 } | 4104 } |
| 4106 } | 4105 } |
| 4107 } | 4106 } |
| 4108 | 4107 |
| 4109 } // namespace cc | 4108 } // namespace cc |
| OLD | NEW |