| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1785 UpdateViewportContainerSizes(); | 1785 UpdateViewportContainerSizes(); |
| 1786 } else { | 1786 } else { |
| 1787 active_tree_->ProcessUIResourceRequestQueue(); | 1787 active_tree_->ProcessUIResourceRequestQueue(); |
| 1788 } | 1788 } |
| 1789 | 1789 |
| 1790 active_tree_->DidBecomeActive(); | 1790 active_tree_->DidBecomeActive(); |
| 1791 ActivateAnimations(); | 1791 ActivateAnimations(); |
| 1792 if (settings_.impl_side_painting) | 1792 if (settings_.impl_side_painting) |
| 1793 client_->RenewTreePriority(); | 1793 client_->RenewTreePriority(); |
| 1794 | 1794 |
| 1795 // TODO(danakj): BTW, we can draw inside this function call before activation |
| 1796 // is really done. ¯\_(ツ)_/¯ crbug.com/433461 |
| 1795 client_->OnCanDrawStateChanged(CanDraw()); | 1797 client_->OnCanDrawStateChanged(CanDraw()); |
| 1796 client_->DidActivateSyncTree(); | 1798 client_->DidActivateSyncTree(); |
| 1797 if (!tree_activation_callback_.is_null()) | 1799 if (!tree_activation_callback_.is_null()) |
| 1798 tree_activation_callback_.Run(); | 1800 tree_activation_callback_.Run(); |
| 1799 | 1801 |
| 1800 if (debug_state_.continuous_painting) { | 1802 if (debug_state_.continuous_painting) { |
| 1801 const RenderingStats& stats = | 1803 const RenderingStats& stats = |
| 1802 rendering_stats_instrumentation_->GetRenderingStats(); | 1804 rendering_stats_instrumentation_->GetRenderingStats(); |
| 1803 // TODO(hendrikw): This requires a different metric when we commit directly | 1805 // TODO(hendrikw): This requires a different metric when we commit directly |
| 1804 // to the active tree. See crbug.com/429311. | 1806 // to the active tree. See crbug.com/429311. |
| (...skipping 1626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3431 } | 3433 } |
| 3432 | 3434 |
| 3433 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3435 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
| 3434 std::vector<PictureLayerImpl*>::iterator it = | 3436 std::vector<PictureLayerImpl*>::iterator it = |
| 3435 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3437 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
| 3436 DCHECK(it != picture_layers_.end()); | 3438 DCHECK(it != picture_layers_.end()); |
| 3437 picture_layers_.erase(it); | 3439 picture_layers_.erase(it); |
| 3438 } | 3440 } |
| 3439 | 3441 |
| 3440 } // namespace cc | 3442 } // namespace cc |
| OLD | NEW |