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

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

Issue 1963693003: Revert of Correctly handle damage involving filters in SurfaceAggregator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « cc/surfaces/surface_aggregator_unittest.cc ('k') | 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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 RenderSurfaceImpl* render_surface = render_surface_layer->render_surface(); 812 RenderSurfaceImpl* render_surface = render_surface_layer->render_surface();
813 813
814 bool should_draw_into_render_pass = 814 bool should_draw_into_render_pass =
815 active_tree_->IsRootLayer(render_surface_layer) || 815 active_tree_->IsRootLayer(render_surface_layer) ||
816 render_surface->contributes_to_drawn_surface() || 816 render_surface->contributes_to_drawn_surface() ||
817 render_surface_layer->HasCopyRequest(); 817 render_surface_layer->HasCopyRequest();
818 if (should_draw_into_render_pass) 818 if (should_draw_into_render_pass)
819 render_surface->AppendRenderPasses(frame); 819 render_surface->AppendRenderPasses(frame);
820 } 820 }
821 821
822 // Damage rects for non-root passes aren't meaningful, so set them to be
823 // equal to the output rect.
824 for (size_t i = 0; i + 1 < frame->render_passes.size(); ++i) {
825 RenderPass* pass = frame->render_passes[i].get();
826 pass->damage_rect = pass->output_rect;
827 }
828
829 // When we are displaying the HUD, change the root damage rect to cover the 822 // When we are displaying the HUD, change the root damage rect to cover the
830 // entire root surface. This will disable partial-swap/scissor optimizations 823 // entire root surface. This will disable partial-swap/scissor optimizations
831 // that would prevent the HUD from updating, since the HUD does not cause 824 // that would prevent the HUD from updating, since the HUD does not cause
832 // damage itself, to prevent it from messing with damage visualizations. Since 825 // damage itself, to prevent it from messing with damage visualizations. Since
833 // damage visualizations are done off the LayerImpls and RenderSurfaceImpls, 826 // damage visualizations are done off the LayerImpls and RenderSurfaceImpls,
834 // changing the RenderPass does not affect them. 827 // changing the RenderPass does not affect them.
835 if (active_tree_->hud_layer()) { 828 if (active_tree_->hud_layer()) {
836 RenderPass* root_pass = frame->render_passes.back().get(); 829 RenderPass* root_pass = frame->render_passes.back().get();
837 root_pass->damage_rect = root_pass->output_rect; 830 root_pass->damage_rect = root_pass->output_rect;
838 } 831 }
(...skipping 3123 matching lines...) Expand 10 before | Expand all | Expand 10 after
3962 return task_runner_provider_->HasImplThread(); 3955 return task_runner_provider_->HasImplThread();
3963 } 3956 }
3964 3957
3965 bool LayerTreeHostImpl::CommitToActiveTree() const { 3958 bool LayerTreeHostImpl::CommitToActiveTree() const {
3966 // In single threaded mode we skip the pending tree and commit directly to the 3959 // In single threaded mode we skip the pending tree and commit directly to the
3967 // active tree. 3960 // active tree.
3968 return !task_runner_provider_->HasImplThread(); 3961 return !task_runner_provider_->HasImplThread();
3969 } 3962 }
3970 3963
3971 } // namespace cc 3964 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/surface_aggregator_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698