| 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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 --surface_index) { | 727 --surface_index) { |
| 728 LayerImpl* render_surface_layer = | 728 LayerImpl* render_surface_layer = |
| 729 (*frame->render_surface_layer_list)[surface_index]; | 729 (*frame->render_surface_layer_list)[surface_index]; |
| 730 RenderSurfaceImpl* render_surface = render_surface_layer->render_surface(); | 730 RenderSurfaceImpl* render_surface = render_surface_layer->render_surface(); |
| 731 | 731 |
| 732 bool should_draw_into_render_pass = | 732 bool should_draw_into_render_pass = |
| 733 render_surface_layer->parent() == NULL || | 733 render_surface_layer->parent() == NULL || |
| 734 render_surface->contributes_to_drawn_surface() || | 734 render_surface->contributes_to_drawn_surface() || |
| 735 render_surface_layer->HasCopyRequest(); | 735 render_surface_layer->HasCopyRequest(); |
| 736 if (should_draw_into_render_pass) | 736 if (should_draw_into_render_pass) |
| 737 render_surface_layer->render_surface()->AppendRenderPasses(frame); | 737 render_surface->AppendRenderPasses(frame); |
| 738 } | 738 } |
| 739 | 739 |
| 740 // When we are displaying the HUD, change the root damage rect to cover the | 740 // When we are displaying the HUD, change the root damage rect to cover the |
| 741 // entire root surface. This will disable partial-swap/scissor optimizations | 741 // entire root surface. This will disable partial-swap/scissor optimizations |
| 742 // that would prevent the HUD from updating, since the HUD does not cause | 742 // that would prevent the HUD from updating, since the HUD does not cause |
| 743 // damage itself, to prevent it from messing with damage visualizations. Since | 743 // damage itself, to prevent it from messing with damage visualizations. Since |
| 744 // damage visualizations are done off the LayerImpls and RenderSurfaceImpls, | 744 // damage visualizations are done off the LayerImpls and RenderSurfaceImpls, |
| 745 // changing the RenderPass does not affect them. | 745 // changing the RenderPass does not affect them. |
| 746 if (active_tree_->hud_layer()) { | 746 if (active_tree_->hud_layer()) { |
| 747 RenderPass* root_pass = frame->render_passes.back(); | 747 RenderPass* root_pass = frame->render_passes.back(); |
| (...skipping 2760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3508 } | 3508 } |
| 3509 | 3509 |
| 3510 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3510 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
| 3511 std::vector<PictureLayerImpl*>::iterator it = | 3511 std::vector<PictureLayerImpl*>::iterator it = |
| 3512 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3512 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
| 3513 DCHECK(it != picture_layers_.end()); | 3513 DCHECK(it != picture_layers_.end()); |
| 3514 picture_layers_.erase(it); | 3514 picture_layers_.erase(it); |
| 3515 } | 3515 } |
| 3516 | 3516 |
| 3517 } // namespace cc | 3517 } // namespace cc |
| OLD | NEW |