Chromium Code Reviews| 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_impl.h" | 5 #include "cc/trees/layer_tree_impl.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 504 // For max_texture_size. | 504 // For max_texture_size. |
| 505 if (!layer_tree_host_impl_->renderer()) | 505 if (!layer_tree_host_impl_->renderer()) |
| 506 return false; | 506 return false; |
| 507 | 507 |
| 508 if (!root_layer()) | 508 if (!root_layer()) |
| 509 return false; | 509 return false; |
| 510 | 510 |
| 511 needs_update_draw_properties_ = false; | 511 needs_update_draw_properties_ = false; |
| 512 render_surface_layer_list_.clear(); | 512 render_surface_layer_list_.clear(); |
| 513 | 513 |
| 514 viewport_rect_for_tile_priority_ = | |
| 515 layer_tree_host_impl_->ViewportRectForTilePriority(); | |
|
danakj
2015/01/20 22:42:46
I find it awkward that LTI mirrors the LTHI method
hush (inactive)
2015/01/21 00:43:07
good point... it is inconsistent..
I will cache it
| |
| 514 { | 516 { |
| 515 TRACE_EVENT2("cc", | 517 TRACE_EVENT2("cc", |
| 516 "LayerTreeImpl::UpdateDrawProperties", | 518 "LayerTreeImpl::UpdateDrawProperties", |
| 517 "IsActive", | 519 "IsActive", |
| 518 IsActiveTree(), | 520 IsActiveTree(), |
| 519 "SourceFrameNumber", | 521 "SourceFrameNumber", |
| 520 source_frame_number_); | 522 source_frame_number_); |
| 521 LayerImpl* page_scale_layer = | 523 LayerImpl* page_scale_layer = |
| 522 page_scale_layer_ ? page_scale_layer_ : InnerViewportContainerLayer(); | 524 page_scale_layer_ ? page_scale_layer_ : InnerViewportContainerLayer(); |
| 523 bool can_render_to_separate_surface = | 525 bool can_render_to_separate_surface = |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 811 | 813 |
| 812 gfx::Rect LayerTreeImpl::DeviceViewport() const { | 814 gfx::Rect LayerTreeImpl::DeviceViewport() const { |
| 813 return layer_tree_host_impl_->DeviceViewport(); | 815 return layer_tree_host_impl_->DeviceViewport(); |
| 814 } | 816 } |
| 815 | 817 |
| 816 gfx::Size LayerTreeImpl::DrawViewportSize() const { | 818 gfx::Size LayerTreeImpl::DrawViewportSize() const { |
| 817 return layer_tree_host_impl_->DrawViewportSize(); | 819 return layer_tree_host_impl_->DrawViewportSize(); |
| 818 } | 820 } |
| 819 | 821 |
| 820 const gfx::Rect LayerTreeImpl::ViewportRectForTilePriority() const { | 822 const gfx::Rect LayerTreeImpl::ViewportRectForTilePriority() const { |
| 821 return layer_tree_host_impl_->ViewportRectForTilePriority(); | 823 return viewport_rect_for_tile_priority_; |
| 822 } | 824 } |
| 823 | 825 |
| 824 scoped_ptr<ScrollbarAnimationController> | 826 scoped_ptr<ScrollbarAnimationController> |
| 825 LayerTreeImpl::CreateScrollbarAnimationController(LayerImpl* scrolling_layer) { | 827 LayerTreeImpl::CreateScrollbarAnimationController(LayerImpl* scrolling_layer) { |
| 826 DCHECK(settings().scrollbar_fade_delay_ms); | 828 DCHECK(settings().scrollbar_fade_delay_ms); |
| 827 DCHECK(settings().scrollbar_fade_duration_ms); | 829 DCHECK(settings().scrollbar_fade_duration_ms); |
| 828 base::TimeDelta delay = | 830 base::TimeDelta delay = |
| 829 base::TimeDelta::FromMilliseconds(settings().scrollbar_fade_delay_ms); | 831 base::TimeDelta::FromMilliseconds(settings().scrollbar_fade_delay_ms); |
| 830 base::TimeDelta resize_delay = base::TimeDelta::FromMilliseconds( | 832 base::TimeDelta resize_delay = base::TimeDelta::FromMilliseconds( |
| 831 settings().scrollbar_fade_resize_delay_ms); | 833 settings().scrollbar_fade_resize_delay_ms); |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1523 scoped_ptr<PendingPageScaleAnimation> pending_animation) { | 1525 scoped_ptr<PendingPageScaleAnimation> pending_animation) { |
| 1524 pending_page_scale_animation_ = pending_animation.Pass(); | 1526 pending_page_scale_animation_ = pending_animation.Pass(); |
| 1525 } | 1527 } |
| 1526 | 1528 |
| 1527 scoped_ptr<PendingPageScaleAnimation> | 1529 scoped_ptr<PendingPageScaleAnimation> |
| 1528 LayerTreeImpl::TakePendingPageScaleAnimation() { | 1530 LayerTreeImpl::TakePendingPageScaleAnimation() { |
| 1529 return pending_page_scale_animation_.Pass(); | 1531 return pending_page_scale_animation_.Pass(); |
| 1530 } | 1532 } |
| 1531 | 1533 |
| 1532 } // namespace cc | 1534 } // namespace cc |
| OLD | NEW |