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 <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 bool root_surface_has_no_visible_damage = | 668 bool root_surface_has_no_visible_damage = |
669 !root_surface->damage_tracker()->current_damage_rect().Intersects( | 669 !root_surface->damage_tracker()->current_damage_rect().Intersects( |
670 root_surface->content_rect()); | 670 root_surface->content_rect()); |
671 bool root_surface_has_contributing_layers = | 671 bool root_surface_has_contributing_layers = |
672 !root_surface->layer_list().empty(); | 672 !root_surface->layer_list().empty(); |
673 bool hud_wants_to_draw_ = active_tree_->hud_layer() && | 673 bool hud_wants_to_draw_ = active_tree_->hud_layer() && |
674 active_tree_->hud_layer()->IsAnimatingHUDContents(); | 674 active_tree_->hud_layer()->IsAnimatingHUDContents(); |
675 if (root_surface_has_contributing_layers && | 675 if (root_surface_has_contributing_layers && |
676 root_surface_has_no_visible_damage && | 676 root_surface_has_no_visible_damage && |
677 active_tree_->LayersWithCopyOutputRequest().empty() && | 677 active_tree_->LayersWithCopyOutputRequest().empty() && |
| 678 !output_surface_->capabilities().can_force_reclaim_resources && |
678 !hud_wants_to_draw_) { | 679 !hud_wants_to_draw_) { |
679 TRACE_EVENT0("cc", | 680 TRACE_EVENT0("cc", |
680 "LayerTreeHostImpl::CalculateRenderPasses::EmptyDamageRect"); | 681 "LayerTreeHostImpl::CalculateRenderPasses::EmptyDamageRect"); |
681 frame->has_no_damage = true; | 682 frame->has_no_damage = true; |
682 DCHECK(!output_surface_->capabilities() | 683 DCHECK(!output_surface_->capabilities() |
683 .draw_and_swap_full_viewport_every_frame); | 684 .draw_and_swap_full_viewport_every_frame); |
684 return DRAW_SUCCESS; | 685 return DRAW_SUCCESS; |
685 } | 686 } |
686 | 687 |
687 TRACE_EVENT1("cc", | 688 TRACE_EVENT1("cc", |
(...skipping 2790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3478 } | 3479 } |
3479 | 3480 |
3480 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3481 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
3481 std::vector<PictureLayerImpl*>::iterator it = | 3482 std::vector<PictureLayerImpl*>::iterator it = |
3482 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3483 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
3483 DCHECK(it != picture_layers_.end()); | 3484 DCHECK(it != picture_layers_.end()); |
3484 picture_layers_.erase(it); | 3485 picture_layers_.erase(it); |
3485 } | 3486 } |
3486 | 3487 |
3487 } // namespace cc | 3488 } // namespace cc |
OLD | NEW |