| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2004 // damage status by pushing the damage status from active tree property | 2004 // damage status by pushing the damage status from active tree property |
| 2005 // trees to pending tree property trees or by moving it onto the layers. | 2005 // trees to pending tree property trees or by moving it onto the layers. |
| 2006 if (active_tree_->property_trees()->changed) { | 2006 if (active_tree_->property_trees()->changed) { |
| 2007 if (pending_tree_->property_trees()->sequence_number == | 2007 if (pending_tree_->property_trees()->sequence_number == |
| 2008 active_tree_->property_trees()->sequence_number) | 2008 active_tree_->property_trees()->sequence_number) |
| 2009 active_tree_->property_trees()->PushChangeTrackingTo( | 2009 active_tree_->property_trees()->PushChangeTrackingTo( |
| 2010 pending_tree_->property_trees()); | 2010 pending_tree_->property_trees()); |
| 2011 else | 2011 else |
| 2012 active_tree_->MoveChangeTrackingToLayers(); | 2012 active_tree_->MoveChangeTrackingToLayers(); |
| 2013 } | 2013 } |
| 2014 active_tree_->property_trees()->PushOpacityIfNeeded( | |
| 2015 pending_tree_->property_trees()); | |
| 2016 | 2014 |
| 2017 TreeSynchronizer::PushLayerProperties(pending_tree(), active_tree()); | 2015 TreeSynchronizer::PushLayerProperties(pending_tree(), active_tree()); |
| 2018 pending_tree_->PushPropertiesTo(active_tree_.get()); | 2016 pending_tree_->PushPropertiesTo(active_tree_.get()); |
| 2019 if (pending_tree_->root_layer()) | 2017 if (pending_tree_->root_layer()) |
| 2020 pending_tree_->property_trees()->ResetAllChangeTracking(); | 2018 pending_tree_->property_trees()->ResetAllChangeTracking(); |
| 2021 | 2019 |
| 2022 // Now that we've synced everything from the pending tree to the active | 2020 // Now that we've synced everything from the pending tree to the active |
| 2023 // tree, rename the pending tree the recycle tree so we can reuse it on the | 2021 // tree, rename the pending tree the recycle tree so we can reuse it on the |
| 2024 // next sync. | 2022 // next sync. |
| 2025 DCHECK(!recycle_tree_); | 2023 DCHECK(!recycle_tree_); |
| (...skipping 2024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4050 const { | 4048 const { |
| 4051 return fixed_raster_scale_attempted_scale_change_history_.count() >= | 4049 return fixed_raster_scale_attempted_scale_change_history_.count() >= |
| 4052 kFixedRasterScaleAttemptedScaleChangeThreshold; | 4050 kFixedRasterScaleAttemptedScaleChangeThreshold; |
| 4053 } | 4051 } |
| 4054 | 4052 |
| 4055 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() { | 4053 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() { |
| 4056 fixed_raster_scale_attempted_scale_change_history_.set(0); | 4054 fixed_raster_scale_attempted_scale_change_history_.set(0); |
| 4057 } | 4055 } |
| 4058 | 4056 |
| 4059 } // namespace cc | 4057 } // namespace cc |
| OLD | NEW |