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 2118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2129 } | 2129 } |
2130 | 2130 |
2131 void LayerTreeHostImpl::NotifyCurrentFlingVelocity(gfx::Vector2dF velocity) { | 2131 void LayerTreeHostImpl::NotifyCurrentFlingVelocity(gfx::Vector2dF velocity) { |
2132 current_fling_velocity_ = velocity; | 2132 current_fling_velocity_ = velocity; |
2133 } | 2133 } |
2134 | 2134 |
2135 void LayerTreeHostImpl::PinchGestureBegin() { | 2135 void LayerTreeHostImpl::PinchGestureBegin() { |
2136 pinch_gesture_active_ = true; | 2136 pinch_gesture_active_ = true; |
2137 previous_pinch_anchor_ = gfx::Point(); | 2137 previous_pinch_anchor_ = gfx::Point(); |
2138 client_->RenewTreePriority(); | 2138 client_->RenewTreePriority(); |
| 2139 active_tree_->SetCurrentlyScrollingLayer(RootScrollLayer()); |
2139 } | 2140 } |
2140 | 2141 |
2141 void LayerTreeHostImpl::PinchGestureUpdate(float magnify_delta, | 2142 void LayerTreeHostImpl::PinchGestureUpdate(float magnify_delta, |
2142 gfx::Point anchor) { | 2143 gfx::Point anchor) { |
2143 TRACE_EVENT0("cc", "LayerTreeHostImpl::PinchGestureUpdate"); | 2144 TRACE_EVENT0("cc", "LayerTreeHostImpl::PinchGestureUpdate"); |
2144 | 2145 |
2145 if (!RootScrollLayer()) | 2146 if (!RootScrollLayer()) |
2146 return; | 2147 return; |
2147 | 2148 |
2148 // Keep the center-of-pinch anchor specified by (x, y) in a stable | 2149 // Keep the center-of-pinch anchor specified by (x, y) in a stable |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2495 | 2496 |
2496 ResourceProvider::ResourceId LayerTreeHostImpl::ResourceIdForUIResource( | 2497 ResourceProvider::ResourceId LayerTreeHostImpl::ResourceIdForUIResource( |
2497 UIResourceId uid) const { | 2498 UIResourceId uid) const { |
2498 UIResourceMap::const_iterator iter = ui_resource_map_.find(uid); | 2499 UIResourceMap::const_iterator iter = ui_resource_map_.find(uid); |
2499 if (iter != ui_resource_map_.end()) | 2500 if (iter != ui_resource_map_.end()) |
2500 return iter->second; | 2501 return iter->second; |
2501 return 0; | 2502 return 0; |
2502 } | 2503 } |
2503 | 2504 |
2504 } // namespace cc | 2505 } // namespace cc |
OLD | NEW |