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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 addMainThreadScrollingReason(); | 376 addMainThreadScrollingReason(); |
377 else | 377 else |
378 removeMainThreadScrollingReason(); | 378 removeMainThreadScrollingReason(); |
379 } | 379 } |
380 } | 380 } |
381 | 381 |
382 void ScrollAnimator::addMainThreadScrollingReason() | 382 void ScrollAnimator::addMainThreadScrollingReason() |
383 { | 383 { |
384 if (WebLayer* scrollLayer = toWebLayer(getScrollableArea()->layerForScrollin
g())) { | 384 if (WebLayer* scrollLayer = toWebLayer(getScrollableArea()->layerForScrollin
g())) { |
385 scrollLayer->addMainThreadScrollingReasons( | 385 scrollLayer->addMainThreadScrollingReasons( |
386 MainThreadScrollingReason::kAnimatingScrollOnMainThread); | 386 MainThreadScrollingReason::kHandlingScrollFromMainThread); |
387 } | 387 } |
388 } | 388 } |
389 | 389 |
390 void ScrollAnimator::removeMainThreadScrollingReason() | 390 void ScrollAnimator::removeMainThreadScrollingReason() |
391 { | 391 { |
392 if (WebLayer* scrollLayer = toWebLayer(getScrollableArea()->layerForScrollin
g())) { | 392 if (WebLayer* scrollLayer = toWebLayer(getScrollableArea()->layerForScrollin
g())) { |
393 scrollLayer->clearMainThreadScrollingReasons( | 393 scrollLayer->clearMainThreadScrollingReasons( |
394 MainThreadScrollingReason::kAnimatingScrollOnMainThread); | 394 MainThreadScrollingReason::kHandlingScrollFromMainThread); |
395 } | 395 } |
396 } | 396 } |
397 | 397 |
398 void ScrollAnimator::notifyCompositorAnimationAborted(int groupId) | 398 void ScrollAnimator::notifyCompositorAnimationAborted(int groupId) |
399 { | 399 { |
400 // An animation aborted by the compositor is treated as a finished | 400 // An animation aborted by the compositor is treated as a finished |
401 // animation. | 401 // animation. |
402 ScrollAnimatorCompositorCoordinator::compositorAnimationFinished(groupId); | 402 ScrollAnimatorCompositorCoordinator::compositorAnimationFinished(groupId); |
403 } | 403 } |
404 | 404 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 } | 458 } |
459 return true; | 459 return true; |
460 } | 460 } |
461 | 461 |
462 DEFINE_TRACE(ScrollAnimator) | 462 DEFINE_TRACE(ScrollAnimator) |
463 { | 463 { |
464 ScrollAnimatorBase::trace(visitor); | 464 ScrollAnimatorBase::trace(visitor); |
465 } | 465 } |
466 | 466 |
467 } // namespace blink | 467 } // namespace blink |
OLD | NEW |