Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: cc/layers/layer_impl.cc

Issue 681713002: Update from chromium https://crrev.com/301315 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698