| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| 11 #include "base/auto_reset.h" | |
| 12 #include "base/trace_event/trace_event.h" | 11 #include "base/trace_event/trace_event.h" |
| 13 #include "base/trace_event/trace_event_argument.h" | 12 #include "base/trace_event/trace_event_argument.h" |
| 14 #include "cc/animation/keyframed_animation_curve.h" | 13 #include "cc/animation/keyframed_animation_curve.h" |
| 15 #include "cc/animation/scrollbar_animation_controller.h" | 14 #include "cc/animation/scrollbar_animation_controller.h" |
| 16 #include "cc/animation/scrollbar_animation_controller_linear_fade.h" | 15 #include "cc/animation/scrollbar_animation_controller_linear_fade.h" |
| 17 #include "cc/animation/scrollbar_animation_controller_thinning.h" | 16 #include "cc/animation/scrollbar_animation_controller_thinning.h" |
| 18 #include "cc/base/math_util.h" | 17 #include "cc/base/math_util.h" |
| 19 #include "cc/base/synced_property.h" | 18 #include "cc/base/synced_property.h" |
| 20 #include "cc/base/util.h" | 19 #include "cc/base/util.h" |
| 21 #include "cc/debug/devtools_instrumentation.h" | 20 #include "cc/debug/devtools_instrumentation.h" |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 inner_viewport_scroll_layer_ = | 492 inner_viewport_scroll_layer_ = |
| 494 LayerById(inner_viewport_scroll_layer_id); | 493 LayerById(inner_viewport_scroll_layer_id); |
| 495 DCHECK(inner_viewport_scroll_layer_); | 494 DCHECK(inner_viewport_scroll_layer_); |
| 496 | 495 |
| 497 outer_viewport_scroll_layer_ = | 496 outer_viewport_scroll_layer_ = |
| 498 LayerById(outer_viewport_scroll_layer_id); | 497 LayerById(outer_viewport_scroll_layer_id); |
| 499 DCHECK(outer_viewport_scroll_layer_ || | 498 DCHECK(outer_viewport_scroll_layer_ || |
| 500 outer_viewport_scroll_layer_id == Layer::INVALID_ID); | 499 outer_viewport_scroll_layer_id == Layer::INVALID_ID); |
| 501 | 500 |
| 502 HideInnerViewportScrollbarsIfNearMinimumScale(); | 501 HideInnerViewportScrollbarsIfNearMinimumScale(); |
| 503 | |
| 504 if (!root_layer_scroll_offset_delegate_) | |
| 505 return; | |
| 506 } | 502 } |
| 507 | 503 |
| 508 void LayerTreeImpl::ClearViewportLayers() { | 504 void LayerTreeImpl::ClearViewportLayers() { |
| 509 page_scale_layer_ = NULL; | 505 page_scale_layer_ = NULL; |
| 510 inner_viewport_scroll_layer_ = NULL; | 506 inner_viewport_scroll_layer_ = NULL; |
| 511 outer_viewport_scroll_layer_ = NULL; | 507 outer_viewport_scroll_layer_ = NULL; |
| 512 } | 508 } |
| 513 | 509 |
| 514 bool LayerTreeImpl::UpdateDrawProperties(bool update_lcd_text) { | 510 bool LayerTreeImpl::UpdateDrawProperties(bool update_lcd_text) { |
| 515 if (!needs_update_draw_properties_) | 511 if (!needs_update_draw_properties_) |
| (...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1563 scoped_ptr<PendingPageScaleAnimation> pending_animation) { | 1559 scoped_ptr<PendingPageScaleAnimation> pending_animation) { |
| 1564 pending_page_scale_animation_ = pending_animation.Pass(); | 1560 pending_page_scale_animation_ = pending_animation.Pass(); |
| 1565 } | 1561 } |
| 1566 | 1562 |
| 1567 scoped_ptr<PendingPageScaleAnimation> | 1563 scoped_ptr<PendingPageScaleAnimation> |
| 1568 LayerTreeImpl::TakePendingPageScaleAnimation() { | 1564 LayerTreeImpl::TakePendingPageScaleAnimation() { |
| 1569 return pending_page_scale_animation_.Pass(); | 1565 return pending_page_scale_animation_.Pass(); |
| 1570 } | 1566 } |
| 1571 | 1567 |
| 1572 } // namespace cc | 1568 } // namespace cc |
| OLD | NEW |