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