| 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 2098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2109 | 2109 |
| 2110 void LayerTreeHostImpl::ActivateSyncTree() { | 2110 void LayerTreeHostImpl::ActivateSyncTree() { |
| 2111 if (pending_tree_) { | 2111 if (pending_tree_) { |
| 2112 TRACE_EVENT_ASYNC_END0("cc", "PendingTree:waiting", pending_tree_.get()); | 2112 TRACE_EVENT_ASYNC_END0("cc", "PendingTree:waiting", pending_tree_.get()); |
| 2113 active_tree_->lifecycle().AdvanceTo(LayerTreeLifecycle::kBeginningSync); | 2113 active_tree_->lifecycle().AdvanceTo(LayerTreeLifecycle::kBeginningSync); |
| 2114 | 2114 |
| 2115 DCHECK(pending_tree_duration_timer_); | 2115 DCHECK(pending_tree_duration_timer_); |
| 2116 // Reset will call the destructor and log the timer histogram. | 2116 // Reset will call the destructor and log the timer histogram. |
| 2117 pending_tree_duration_timer_.reset(); | 2117 pending_tree_duration_timer_.reset(); |
| 2118 | 2118 |
| 2119 // In most cases, this will be reset in NotifyReadyToActivate, since we |
| 2120 // activate the pending tree only when its ready. But an activation may be |
| 2121 // forced, in the case of a context loss for instance, so reset it here as |
| 2122 // well. |
| 2123 pending_tree_raster_duration_timer_.reset(); |
| 2124 |
| 2119 // Process any requests in the UI resource queue. The request queue is | 2125 // Process any requests in the UI resource queue. The request queue is |
| 2120 // given in LayerTreeHost::FinishCommitOnImplThread. This must take place | 2126 // given in LayerTreeHost::FinishCommitOnImplThread. This must take place |
| 2121 // before the swap. | 2127 // before the swap. |
| 2122 pending_tree_->ProcessUIResourceRequestQueue(); | 2128 pending_tree_->ProcessUIResourceRequestQueue(); |
| 2123 | 2129 |
| 2124 if (pending_tree_->needs_full_tree_sync()) { | 2130 if (pending_tree_->needs_full_tree_sync()) { |
| 2125 TreeSynchronizer::SynchronizeTrees(pending_tree_.get(), | 2131 TreeSynchronizer::SynchronizeTrees(pending_tree_.get(), |
| 2126 active_tree_.get()); | 2132 active_tree_.get()); |
| 2127 } | 2133 } |
| 2128 | 2134 |
| (...skipping 2192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4321 | 4327 |
| 4322 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { | 4328 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { |
| 4323 if (!element_id) | 4329 if (!element_id) |
| 4324 return; | 4330 return; |
| 4325 if (ScrollbarAnimationController* animation_controller = | 4331 if (ScrollbarAnimationController* animation_controller = |
| 4326 ScrollbarAnimationControllerForElementId(element_id)) | 4332 ScrollbarAnimationControllerForElementId(element_id)) |
| 4327 animation_controller->DidScrollUpdate(); | 4333 animation_controller->DidScrollUpdate(); |
| 4328 } | 4334 } |
| 4329 | 4335 |
| 4330 } // namespace cc | 4336 } // namespace cc |
| OLD | NEW |