Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 872323003: Use cached render surface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698