| 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 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1867 client_->RenewTreePriority(); | 1867 client_->RenewTreePriority(); |
| 1868 | 1868 |
| 1869 client_->OnCanDrawStateChanged(CanDraw()); | 1869 client_->OnCanDrawStateChanged(CanDraw()); |
| 1870 client_->DidActivateSyncTree(); | 1870 client_->DidActivateSyncTree(); |
| 1871 if (!tree_activation_callback_.is_null()) | 1871 if (!tree_activation_callback_.is_null()) |
| 1872 tree_activation_callback_.Run(); | 1872 tree_activation_callback_.Run(); |
| 1873 | 1873 |
| 1874 if (debug_state_.continuous_painting) { | 1874 if (debug_state_.continuous_painting) { |
| 1875 const RenderingStats& stats = | 1875 const RenderingStats& stats = |
| 1876 rendering_stats_instrumentation_->GetRenderingStats(); | 1876 rendering_stats_instrumentation_->GetRenderingStats(); |
| 1877 paint_time_counter_->SavePaintTime(stats.main_stats.paint_time + | 1877 // TODO(hendrikw): This requires a different metric when we commit directly |
| 1878 stats.main_stats.record_time + | 1878 // to the active tree. See crbug.com/429311. |
| 1879 stats.impl_stats.rasterize_time); | 1879 paint_time_counter_->SavePaintTime( |
| 1880 stats.impl_stats.commit_to_activate_duration.GetLastTimeDelta() + |
| 1881 stats.impl_stats.draw_duration.GetLastTimeDelta()); |
| 1880 } | 1882 } |
| 1881 | 1883 |
| 1882 if (time_source_client_adapter_ && time_source_client_adapter_->Active()) | 1884 if (time_source_client_adapter_ && time_source_client_adapter_->Active()) |
| 1883 DCHECK(active_tree_->root_layer()); | 1885 DCHECK(active_tree_->root_layer()); |
| 1884 | 1886 |
| 1885 scoped_ptr<PageScaleAnimation> page_scale_animation = | 1887 scoped_ptr<PageScaleAnimation> page_scale_animation = |
| 1886 active_tree_->TakePageScaleAnimation(); | 1888 active_tree_->TakePageScaleAnimation(); |
| 1887 if (page_scale_animation) { | 1889 if (page_scale_animation) { |
| 1888 page_scale_animation_ = page_scale_animation.Pass(); | 1890 page_scale_animation_ = page_scale_animation.Pass(); |
| 1889 SetNeedsAnimate(); | 1891 SetNeedsAnimate(); |
| (...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3514 } | 3516 } |
| 3515 | 3517 |
| 3516 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3518 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
| 3517 std::vector<PictureLayerImpl*>::iterator it = | 3519 std::vector<PictureLayerImpl*>::iterator it = |
| 3518 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3520 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
| 3519 DCHECK(it != picture_layers_.end()); | 3521 DCHECK(it != picture_layers_.end()); |
| 3520 picture_layers_.erase(it); | 3522 picture_layers_.erase(it); |
| 3521 } | 3523 } |
| 3522 | 3524 |
| 3523 } // namespace cc | 3525 } // namespace cc |
| OLD | NEW |