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.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <stack> | 8 #include <stack> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1153 elastic_overscroll_ += info->elastic_overscroll_delta; | 1153 elastic_overscroll_ += info->elastic_overscroll_delta; |
1154 if (!settings_.use_pinch_virtual_viewport) { | 1154 if (!settings_.use_pinch_virtual_viewport) { |
1155 client_->ApplyViewportDeltas( | 1155 client_->ApplyViewportDeltas( |
1156 inner_viewport_scroll_delta + outer_viewport_scroll_delta, | 1156 inner_viewport_scroll_delta + outer_viewport_scroll_delta, |
1157 info->page_scale_delta, | 1157 info->page_scale_delta, |
1158 info->top_controls_delta); | 1158 info->top_controls_delta); |
1159 } else { | 1159 } else { |
1160 // TODO(ccameron): pass the elastic overscroll here so that input events | 1160 // TODO(ccameron): pass the elastic overscroll here so that input events |
1161 // may be translated appropriately. | 1161 // may be translated appropriately. |
1162 client_->ApplyViewportDeltas( | 1162 client_->ApplyViewportDeltas( |
1163 inner_viewport_scroll_delta, | 1163 inner_viewport_scroll_delta, outer_viewport_scroll_delta, |
1164 outer_viewport_scroll_delta, | 1164 info->elastic_overscroll_delta, info->page_scale_delta, |
1165 info->page_scale_delta, | |
1166 info->top_controls_delta); | 1165 info->top_controls_delta); |
1167 } | 1166 } |
1168 } | 1167 } |
1169 } | 1168 } |
1170 | 1169 |
1171 void LayerTreeHost::StartRateLimiter() { | 1170 void LayerTreeHost::StartRateLimiter() { |
1172 if (inside_begin_main_frame_) | 1171 if (inside_begin_main_frame_) |
1173 return; | 1172 return; |
1174 | 1173 |
1175 if (!rate_limit_timer_.IsRunning()) { | 1174 if (!rate_limit_timer_.IsRunning()) { |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1392 bool children_need_begin_frames) const { | 1391 bool children_need_begin_frames) const { |
1393 proxy_->SetChildrenNeedBeginFrames(children_need_begin_frames); | 1392 proxy_->SetChildrenNeedBeginFrames(children_need_begin_frames); |
1394 } | 1393 } |
1395 | 1394 |
1396 void LayerTreeHost::SendBeginFramesToChildren( | 1395 void LayerTreeHost::SendBeginFramesToChildren( |
1397 const BeginFrameArgs& args) const { | 1396 const BeginFrameArgs& args) const { |
1398 client_->SendBeginFramesToChildren(args); | 1397 client_->SendBeginFramesToChildren(args); |
1399 } | 1398 } |
1400 | 1399 |
1401 } // namespace cc | 1400 } // namespace cc |
OLD | NEW |