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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp

Issue 1700653002: CC Animation: Expose TargetProperty enum to be aliased in Blink Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 9 months 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011, Google Inc. All rights reserved. 2 * Copyright (c) 2011, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 CompositorScrollOffsetAnimationCurve::ScrollDurationInverseD elta : 236 CompositorScrollOffsetAnimationCurve::ScrollDurationInverseD elta :
237 CompositorScrollOffsetAnimationCurve::ScrollDurationConstant )); 237 CompositorScrollOffsetAnimationCurve::ScrollDurationConstant ));
238 m_animationCurve->setInitialValue(currentPosition()); 238 m_animationCurve->setInitialValue(currentPosition());
239 } 239 }
240 240
241 bool sentToCompositor = false; 241 bool sentToCompositor = false;
242 if (!m_scrollableArea->shouldScrollOnMainThread()) { 242 if (!m_scrollableArea->shouldScrollOnMainThread()) {
243 OwnPtr<CompositorAnimation> animation = adoptPtr( 243 OwnPtr<CompositorAnimation> animation = adoptPtr(
244 CompositorFactory::current().createAnimation( 244 CompositorFactory::current().createAnimation(
245 *m_animationCurve, 245 *m_animationCurve,
246 CompositorAnimation::TargetPropertyScrollOffset)); 246 CompositorTargetProperty::SCROLL_OFFSET));
247 // Being here means that either there is an animation that needs 247 // Being here means that either there is an animation that needs
248 // to be sent to the compositor, or an animation that needs to 248 // to be sent to the compositor, or an animation that needs to
249 // be updated (a new scroll event before the previous animation 249 // be updated (a new scroll event before the previous animation
250 // is finished). In either case, the start time is when the 250 // is finished). In either case, the start time is when the
251 // first animation was initiated. This re-targets the animation 251 // first animation was initiated. This re-targets the animation
252 // using the current time on main thread. 252 // using the current time on main thread.
253 animation->setStartTime(m_startTime); 253 animation->setStartTime(m_startTime);
254 254
255 int animationId = animation->id(); 255 int animationId = animation->id();
256 int animationGroupId = animation->group(); 256 int animationGroupId = animation->group();
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 } 303 }
304 return true; 304 return true;
305 } 305 }
306 306
307 DEFINE_TRACE(ScrollAnimator) 307 DEFINE_TRACE(ScrollAnimator)
308 { 308 {
309 ScrollAnimatorBase::trace(visitor); 309 ScrollAnimatorBase::trace(visitor);
310 } 310 }
311 311
312 } // namespace blink 312 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698