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 "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "cc/animation/keyframed_animation_curve.h" | 8 #include "cc/animation/keyframed_animation_curve.h" |
9 #include "cc/animation/scrollbar_animation_controller.h" | 9 #include "cc/animation/scrollbar_animation_controller.h" |
10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 vertical->SetVerticalAdjust(vertical_adjust); | 346 vertical->SetVerticalAdjust(vertical_adjust); |
347 vertical->SetVisibleToTotalLengthRatio( | 347 vertical->SetVisibleToTotalLengthRatio( |
348 scrollable_viewport.height() / ScrollableSize().height()); | 348 scrollable_viewport.height() / ScrollableSize().height()); |
349 } | 349 } |
350 } | 350 } |
351 | 351 |
352 void LayerTreeImpl::UpdateDrawProperties() { | 352 void LayerTreeImpl::UpdateDrawProperties() { |
353 if (IsActiveTree() && RootScrollLayer() && RootContainerLayer()) | 353 if (IsActiveTree() && RootScrollLayer() && RootContainerLayer()) |
354 UpdateRootScrollLayerSizeDelta(); | 354 UpdateRootScrollLayerSizeDelta(); |
355 | 355 |
356 if (IsActiveTree() && | 356 if (IsActiveTree() && RootContainerLayer()) |
357 RootContainerLayer() | |
358 && !RootContainerLayer()->masks_to_bounds()) { | |
359 UpdateSolidColorScrollbars(); | 357 UpdateSolidColorScrollbars(); |
360 } | |
361 | 358 |
362 needs_update_draw_properties_ = false; | 359 needs_update_draw_properties_ = false; |
363 render_surface_layer_list_.clear(); | 360 render_surface_layer_list_.clear(); |
364 | 361 |
365 // For max_texture_size. | 362 // For max_texture_size. |
366 if (!layer_tree_host_impl_->renderer()) | 363 if (!layer_tree_host_impl_->renderer()) |
367 return; | 364 return; |
368 | 365 |
369 if (!root_layer()) | 366 if (!root_layer()) |
370 return; | 367 return; |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 const std::vector<LayerImpl*>& LayerTreeImpl::LayersWithCopyOutputRequest() | 790 const std::vector<LayerImpl*>& LayerTreeImpl::LayersWithCopyOutputRequest() |
794 const { | 791 const { |
795 // Only the active tree needs to know about layers with copy requests, as | 792 // Only the active tree needs to know about layers with copy requests, as |
796 // they are aborted if not serviced during draw. | 793 // they are aborted if not serviced during draw. |
797 DCHECK(IsActiveTree()); | 794 DCHECK(IsActiveTree()); |
798 | 795 |
799 return layers_with_copy_output_request_; | 796 return layers_with_copy_output_request_; |
800 } | 797 } |
801 | 798 |
802 } // namespace cc | 799 } // namespace cc |
OLD | NEW |