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

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

Issue 1752993002: cc : Delete LayerImpl::NoteLayerPropertyChangedForSubtree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after
1701 1701
1702 // The next frame should start by assuming nothing has changed, and changes 1702 // The next frame should start by assuming nothing has changed, and changes
1703 // are noted as they occur. 1703 // are noted as they occur.
1704 // TODO(boliu): If we did a temporary software renderer frame, propogate the 1704 // TODO(boliu): If we did a temporary software renderer frame, propogate the
1705 // damage forward to the next frame. 1705 // damage forward to the next frame.
1706 for (size_t i = 0; i < frame->render_surface_layer_list->size(); i++) { 1706 for (size_t i = 0; i < frame->render_surface_layer_list->size(); i++) {
1707 (*frame->render_surface_layer_list)[i]->render_surface()->damage_tracker()-> 1707 (*frame->render_surface_layer_list)[i]->render_surface()->damage_tracker()->
1708 DidDrawDamagedArea(); 1708 DidDrawDamagedArea();
1709 } 1709 }
1710 active_tree_->root_layer()->ResetAllChangeTrackingForSubtree(); 1710 active_tree_->root_layer()->ResetAllChangeTrackingForSubtree();
1711 active_tree_->property_trees()->transform_tree.ResetChangeTracking(); 1711 active_tree_->property_trees()->ResetAllChangeTracking();
1712 active_tree_->property_trees()->effect_tree.ResetChangeTracking();
1713 active_tree_->property_trees()->changed = false;
1714 1712
1715 active_tree_->set_has_ever_been_drawn(true); 1713 active_tree_->set_has_ever_been_drawn(true);
1716 devtools_instrumentation::DidDrawFrame(id_); 1714 devtools_instrumentation::DidDrawFrame(id_);
1717 benchmark_instrumentation::IssueImplThreadRenderingStatsEvent( 1715 benchmark_instrumentation::IssueImplThreadRenderingStatsEvent(
1718 rendering_stats_instrumentation_->impl_thread_rendering_stats()); 1716 rendering_stats_instrumentation_->impl_thread_rendering_stats());
1719 rendering_stats_instrumentation_->AccumulateAndClearImplThreadStats(); 1717 rendering_stats_instrumentation_->AccumulateAndClearImplThreadStats();
1720 } 1718 }
1721 1719
1722 void LayerTreeHostImpl::DidDrawAllLayers(const FrameData& frame) { 1720 void LayerTreeHostImpl::DidDrawAllLayers(const FrameData& frame) {
1723 for (size_t i = 0; i < frame.will_draw_layers.size(); ++i) 1721 for (size_t i = 0; i < frame.will_draw_layers.size(); ++i)
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
2002 if (pending_tree_->property_trees()->sequence_number == 2000 if (pending_tree_->property_trees()->sequence_number ==
2003 active_tree_->property_trees()->sequence_number) 2001 active_tree_->property_trees()->sequence_number)
2004 active_tree_->property_trees()->PushChangeTrackingTo( 2002 active_tree_->property_trees()->PushChangeTrackingTo(
2005 pending_tree_->property_trees()); 2003 pending_tree_->property_trees());
2006 else 2004 else
2007 active_tree_->root_layer()->PushLayerPropertyChangedForSubtree(); 2005 active_tree_->root_layer()->PushLayerPropertyChangedForSubtree();
2008 } 2006 }
2009 TreeSynchronizer::PushProperties(pending_tree_->root_layer(), 2007 TreeSynchronizer::PushProperties(pending_tree_->root_layer(),
2010 active_tree_->root_layer()); 2008 active_tree_->root_layer());
2011 pending_tree_->PushPropertiesTo(active_tree_.get()); 2009 pending_tree_->PushPropertiesTo(active_tree_.get());
2012 if (pending_tree_->root_layer()) { 2010 if (pending_tree_->root_layer())
2013 pending_tree_->property_trees()->transform_tree.ResetChangeTracking(); 2011 pending_tree_->property_trees()->ResetAllChangeTracking();
2014 pending_tree_->property_trees()->effect_tree.ResetChangeTracking();
2015 pending_tree_->property_trees()->changed = false;
2016 }
2017 2012
2018 // Now that we've synced everything from the pending tree to the active 2013 // Now that we've synced everything from the pending tree to the active
2019 // tree, rename the pending tree the recycle tree so we can reuse it on the 2014 // tree, rename the pending tree the recycle tree so we can reuse it on the
2020 // next sync. 2015 // next sync.
2021 DCHECK(!recycle_tree_); 2016 DCHECK(!recycle_tree_);
2022 pending_tree_.swap(recycle_tree_); 2017 pending_tree_.swap(recycle_tree_);
2023 2018
2024 UpdateViewportContainerSizes(); 2019 UpdateViewportContainerSizes();
2025 2020
2026 // If we commit to the active tree directly, this is already done during 2021 // If we commit to the active tree directly, this is already done during
(...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after
3991 return task_runner_provider_->HasImplThread(); 3986 return task_runner_provider_->HasImplThread();
3992 } 3987 }
3993 3988
3994 bool LayerTreeHostImpl::CommitToActiveTree() const { 3989 bool LayerTreeHostImpl::CommitToActiveTree() const {
3995 // In single threaded mode we skip the pending tree and commit directly to the 3990 // In single threaded mode we skip the pending tree and commit directly to the
3996 // active tree. 3991 // active tree.
3997 return !task_runner_provider_->HasImplThread(); 3992 return !task_runner_provider_->HasImplThread();
3998 } 3993 }
3999 3994
4000 } // namespace cc 3995 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698