| 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 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1811 const RenderingStats& stats = | 1811 const RenderingStats& stats = |
| 1812 rendering_stats_instrumentation_->GetRenderingStats(); | 1812 rendering_stats_instrumentation_->GetRenderingStats(); |
| 1813 paint_time_counter_->SavePaintTime(stats.main_stats.paint_time + | 1813 paint_time_counter_->SavePaintTime(stats.main_stats.paint_time + |
| 1814 stats.main_stats.record_time + | 1814 stats.main_stats.record_time + |
| 1815 stats.impl_stats.rasterize_time); | 1815 stats.impl_stats.rasterize_time); |
| 1816 } | 1816 } |
| 1817 | 1817 |
| 1818 if (time_source_client_adapter_ && time_source_client_adapter_->Active()) | 1818 if (time_source_client_adapter_ && time_source_client_adapter_->Active()) |
| 1819 DCHECK(active_tree_->root_layer()); | 1819 DCHECK(active_tree_->root_layer()); |
| 1820 | 1820 |
| 1821 page_scale_animation_ = active_tree_->TakePageScaleAnimation(); | 1821 scoped_ptr<PageScaleAnimation> page_scale_animation = |
| 1822 if (page_scale_animation_) { | 1822 active_tree_->TakePageScaleAnimation(); |
| 1823 if (page_scale_animation) { |
| 1824 page_scale_animation_ = page_scale_animation.Pass(); |
| 1823 SetNeedsAnimate(); | 1825 SetNeedsAnimate(); |
| 1824 client_->SetNeedsCommitOnImplThread(); | 1826 client_->SetNeedsCommitOnImplThread(); |
| 1825 client_->RenewTreePriority(); | 1827 client_->RenewTreePriority(); |
| 1826 } | 1828 } |
| 1827 } | 1829 } |
| 1828 | 1830 |
| 1829 void LayerTreeHostImpl::SetVisible(bool visible) { | 1831 void LayerTreeHostImpl::SetVisible(bool visible) { |
| 1830 DCHECK(proxy_->IsImplThread()); | 1832 DCHECK(proxy_->IsImplThread()); |
| 1831 | 1833 |
| 1832 if (visible_ == visible) | 1834 if (visible_ == visible) |
| (...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3385 } | 3387 } |
| 3386 | 3388 |
| 3387 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3389 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
| 3388 std::vector<PictureLayerImpl*>::iterator it = | 3390 std::vector<PictureLayerImpl*>::iterator it = |
| 3389 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3391 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
| 3390 DCHECK(it != picture_layers_.end()); | 3392 DCHECK(it != picture_layers_.end()); |
| 3391 picture_layers_.erase(it); | 3393 picture_layers_.erase(it); |
| 3392 } | 3394 } |
| 3393 | 3395 |
| 3394 } // namespace cc | 3396 } // namespace cc |
| OLD | NEW |