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 // commit. | 2004 // commit. |
2005 ActivateAnimations(); | 2005 ActivateAnimations(); |
2006 | 2006 |
2007 // Compositor worker operates on the active tree so we have to run again | 2007 // Compositor worker operates on the active tree so we have to run again |
2008 // after activation. | 2008 // after activation. |
2009 Mutate(CurrentBeginFrameArgs().frame_time); | 2009 Mutate(CurrentBeginFrameArgs().frame_time); |
2010 } else { | 2010 } else { |
2011 active_tree_->ProcessUIResourceRequestQueue(); | 2011 active_tree_->ProcessUIResourceRequestQueue(); |
2012 } | 2012 } |
2013 | 2013 |
2014 // bounds_delta isn't a pushed property, so the newly-pushed property tree | |
2015 // won't already account for current bounds_delta values. This needs to | |
2016 // happen before calling UpdateViewportContainerSizes(). | |
2017 active_tree_->UpdatePropertyTreesForBoundsDelta(); | |
2018 UpdateViewportContainerSizes(); | 2014 UpdateViewportContainerSizes(); |
2019 | 2015 |
2020 active_tree_->DidBecomeActive(); | 2016 active_tree_->DidBecomeActive(); |
2021 client_->RenewTreePriority(); | 2017 client_->RenewTreePriority(); |
2022 // If we have any picture layers, then by activating we also modified tile | 2018 // If we have any picture layers, then by activating we also modified tile |
2023 // priorities. | 2019 // priorities. |
2024 if (!active_tree_->picture_layers().empty()) | 2020 if (!active_tree_->picture_layers().empty()) |
2025 DidModifyTilePriorities(); | 2021 DidModifyTilePriorities(); |
2026 | 2022 |
2027 client_->OnCanDrawStateChanged(CanDraw()); | 2023 client_->OnCanDrawStateChanged(CanDraw()); |
(...skipping 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4022 return task_runner_provider_->HasImplThread(); | 4018 return task_runner_provider_->HasImplThread(); |
4023 } | 4019 } |
4024 | 4020 |
4025 bool LayerTreeHostImpl::CommitToActiveTree() const { | 4021 bool LayerTreeHostImpl::CommitToActiveTree() const { |
4026 // In single threaded mode we skip the pending tree and commit directly to the | 4022 // In single threaded mode we skip the pending tree and commit directly to the |
4027 // active tree. | 4023 // active tree. |
4028 return !task_runner_provider_->HasImplThread(); | 4024 return !task_runner_provider_->HasImplThread(); |
4029 } | 4025 } |
4030 | 4026 |
4031 } // namespace cc | 4027 } // namespace cc |
OLD | NEW |