OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layers/layer_impl.h" | 5 #include "cc/layers/layer_impl.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/debug/trace_event_argument.h" | 8 #include "base/debug/trace_event_argument.h" |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1145 | 1145 |
1146 if (scroll_offset_delegate_) { | 1146 if (scroll_offset_delegate_) { |
1147 scroll_offset_delegate_->SetTotalScrollOffset( | 1147 scroll_offset_delegate_->SetTotalScrollOffset( |
1148 ScrollOffsetWithDelta(scroll_offset_, scroll_delta)); | 1148 ScrollOffsetWithDelta(scroll_offset_, scroll_delta)); |
1149 } else { | 1149 } else { |
1150 scroll_delta_ = scroll_delta; | 1150 scroll_delta_ = scroll_delta; |
1151 } | 1151 } |
1152 } | 1152 } |
1153 | 1153 |
1154 if (changed) { | 1154 if (changed) { |
| 1155 if (scroll_offset_delegate_) |
| 1156 scroll_offset_delegate_->Update(); |
1155 DidScroll(); | 1157 DidScroll(); |
1156 } | 1158 } |
1157 } | 1159 } |
1158 | 1160 |
1159 gfx::Vector2dF LayerImpl::ScrollDelta() const { | 1161 gfx::Vector2dF LayerImpl::ScrollDelta() const { |
1160 if (scroll_offset_delegate_) { | 1162 if (scroll_offset_delegate_) { |
1161 return scroll_offset_delegate_->GetTotalScrollOffset().DeltaFrom( | 1163 return scroll_offset_delegate_->GetTotalScrollOffset().DeltaFrom( |
1162 scroll_offset_); | 1164 scroll_offset_); |
1163 } | 1165 } |
1164 return scroll_delta_; | 1166 return scroll_delta_; |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1587 | 1589 |
1588 void LayerImpl::NotifyAnimationFinished( | 1590 void LayerImpl::NotifyAnimationFinished( |
1589 base::TimeTicks monotonic_time, | 1591 base::TimeTicks monotonic_time, |
1590 Animation::TargetProperty target_property, | 1592 Animation::TargetProperty target_property, |
1591 int group) { | 1593 int group) { |
1592 if (target_property == Animation::ScrollOffset) | 1594 if (target_property == Animation::ScrollOffset) |
1593 layer_tree_impl_->InputScrollAnimationFinished(); | 1595 layer_tree_impl_->InputScrollAnimationFinished(); |
1594 } | 1596 } |
1595 | 1597 |
1596 } // namespace cc | 1598 } // namespace cc |
OLD | NEW |