| Index: cc/layers/layer_impl.cc
|
| diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
|
| index eca772371d4559e2092ca7d9f4928a82f24dab2a..3af186b798fbfa4930a19bad6d18de57b6d89a87 100644
|
| --- a/cc/layers/layer_impl.cc
|
| +++ b/cc/layers/layer_impl.cc
|
| @@ -272,6 +272,22 @@ gfx::Vector2dF LayerImpl::ScrollBy(gfx::Vector2dF scroll) {
|
| return unscrolled;
|
| }
|
|
|
| +void LayerImpl::ApplySentScrollDeltas() {
|
| + // Pending tree never has sent scroll deltas
|
| + DCHECK(layer_tree_impl()->IsActiveTree());
|
| +
|
| + // Apply sent scroll deltas to scroll position / scroll delta as if the
|
| + // main thread had applied them and then committed those values.
|
| + scroll_offset_ += sent_scroll_delta_;
|
| + scroll_delta_ -= sent_scroll_delta_;
|
| + sent_scroll_delta_ = gfx::Vector2d();
|
| +
|
| + DCHECK_GE(TotalScrollOffset().x(), 0);
|
| + DCHECK_GE(TotalScrollOffset().y(), 0);
|
| + DCHECK_LE(TotalScrollOffset().x(), max_scroll_offset_.x());
|
| + DCHECK_LE(TotalScrollOffset().y(), max_scroll_offset_.y());
|
| +}
|
| +
|
| InputHandler::ScrollStatus LayerImpl::TryScroll(
|
| gfx::PointF screen_space_point,
|
| InputHandler::ScrollInputType type) const {
|
|
|