OLD | NEW |
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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 compositorOffsetFromBlinkOffset(m_targetOffset)); | 351 compositorOffsetFromBlinkOffset(m_targetOffset)); |
352 } | 352 } |
353 | 353 |
354 if (m_runState == RunState::WaitingToCancelOnCompositorButNewScroll) | 354 if (m_runState == RunState::WaitingToCancelOnCompositorButNewScroll) |
355 m_animationCurve->setInitialValue(compositorOffsetFromBlinkOffset(cu
rrentPosition())); | 355 m_animationCurve->setInitialValue(compositorOffsetFromBlinkOffset(cu
rrentPosition())); |
356 | 356 |
357 m_runState = RunState::WaitingToSendToCompositor; | 357 m_runState = RunState::WaitingToSendToCompositor; |
358 } | 358 } |
359 | 359 |
360 if (m_runState == RunState::WaitingToSendToCompositor) { | 360 if (m_runState == RunState::WaitingToSendToCompositor) { |
361 if (!m_compositorAnimationAttachedToLayerId) | 361 if (!m_compositorAnimationAttachedToElementId) |
362 reattachCompositorPlayerIfNeeded(getScrollableArea()->compositorAnim
ationTimeline()); | 362 reattachCompositorPlayerIfNeeded(getScrollableArea()->compositorAnim
ationTimeline()); |
363 | 363 |
364 if (!m_animationCurve) | 364 if (!m_animationCurve) |
365 createAnimationCurve(); | 365 createAnimationCurve(); |
366 | 366 |
367 bool runningOnMainThread = false; | 367 bool runningOnMainThread = false; |
368 bool sentToCompositor = sendAnimationToCompositor(); | 368 bool sentToCompositor = sendAnimationToCompositor(); |
369 if (!sentToCompositor) { | 369 if (!sentToCompositor) { |
370 runningOnMainThread = registerAndScheduleAnimation(); | 370 runningOnMainThread = registerAndScheduleAnimation(); |
371 if (runningOnMainThread) | 371 if (runningOnMainThread) |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 } | 459 } |
460 return true; | 460 return true; |
461 } | 461 } |
462 | 462 |
463 DEFINE_TRACE(ScrollAnimator) | 463 DEFINE_TRACE(ScrollAnimator) |
464 { | 464 { |
465 ScrollAnimatorBase::trace(visitor); | 465 ScrollAnimatorBase::trace(visitor); |
466 } | 466 } |
467 | 467 |
468 } // namespace blink | 468 } // namespace blink |
OLD | NEW |