| 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 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| (...skipping 2054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2065 } | 2065 } |
| 2066 | 2066 |
| 2067 void LayerTreeHostImpl::ScrollEnd() { | 2067 void LayerTreeHostImpl::ScrollEnd() { |
| 2068 if (top_controls_manager_) | 2068 if (top_controls_manager_) |
| 2069 top_controls_manager_->ScrollEnd(); | 2069 top_controls_manager_->ScrollEnd(); |
| 2070 ClearCurrentlyScrollingLayer(); | 2070 ClearCurrentlyScrollingLayer(); |
| 2071 StartScrollbarAnimation(); | 2071 StartScrollbarAnimation(); |
| 2072 } | 2072 } |
| 2073 | 2073 |
| 2074 InputHandler::ScrollStatus LayerTreeHostImpl::FlingScrollBegin() { | 2074 InputHandler::ScrollStatus LayerTreeHostImpl::FlingScrollBegin() { |
| 2075 if (active_tree_->CurrentlyScrollingLayer()) | 2075 if (!active_tree_->CurrentlyScrollingLayer()) |
| 2076 return ScrollStarted; | 2076 return ScrollIgnored; |
| 2077 | 2077 |
| 2078 return ScrollIgnored; | 2078 if (settings_.ignore_root_layer_flings && |
| 2079 active_tree_->CurrentlyScrollingLayer() == |
| 2080 active_tree_->RootScrollLayer()) { |
| 2081 ClearCurrentlyScrollingLayer(); |
| 2082 return ScrollIgnored; |
| 2083 } |
| 2084 |
| 2085 return ScrollStarted; |
| 2079 } | 2086 } |
| 2080 | 2087 |
| 2081 void LayerTreeHostImpl::NotifyCurrentFlingVelocity(gfx::Vector2dF velocity) { | 2088 void LayerTreeHostImpl::NotifyCurrentFlingVelocity(gfx::Vector2dF velocity) { |
| 2082 current_fling_velocity_ = velocity; | 2089 current_fling_velocity_ = velocity; |
| 2083 } | 2090 } |
| 2084 | 2091 |
| 2085 void LayerTreeHostImpl::PinchGestureBegin() { | 2092 void LayerTreeHostImpl::PinchGestureBegin() { |
| 2086 pinch_gesture_active_ = true; | 2093 pinch_gesture_active_ = true; |
| 2087 previous_pinch_anchor_ = gfx::Point(); | 2094 previous_pinch_anchor_ = gfx::Point(); |
| 2088 client_->RenewTreePriority(); | 2095 client_->RenewTreePriority(); |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2407 if (LayerTreeDebugState::Equal(debug_state_, new_debug_state)) | 2414 if (LayerTreeDebugState::Equal(debug_state_, new_debug_state)) |
| 2408 return; | 2415 return; |
| 2409 if (debug_state_.continuous_painting != new_debug_state.continuous_painting) | 2416 if (debug_state_.continuous_painting != new_debug_state.continuous_painting) |
| 2410 paint_time_counter_->ClearHistory(); | 2417 paint_time_counter_->ClearHistory(); |
| 2411 | 2418 |
| 2412 debug_state_ = new_debug_state; | 2419 debug_state_ = new_debug_state; |
| 2413 SetFullRootLayerDamage(); | 2420 SetFullRootLayerDamage(); |
| 2414 } | 2421 } |
| 2415 | 2422 |
| 2416 } // namespace cc | 2423 } // namespace cc |
| OLD | NEW |