| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 // and bail out if we're not caught up. | 540 // and bail out if we're not caught up. |
| 541 startAnimation(DoNotCatchUp); | 541 startAnimation(DoNotCatchUp); |
| 542 } | 542 } |
| 543 } | 543 } |
| 544 } | 544 } |
| 545 | 545 |
| 546 void BitmapImage::stopAnimation() | 546 void BitmapImage::stopAnimation() |
| 547 { | 547 { |
| 548 // This timer is used to animate all occurrences of this image. Don't inval
idate | 548 // This timer is used to animate all occurrences of this image. Don't inval
idate |
| 549 // the timer unless all renderers have stopped drawing. | 549 // the timer unless all renderers have stopped drawing. |
| 550 m_frameTimer.clear(); | 550 m_frameTimer.reset(); |
| 551 } | 551 } |
| 552 | 552 |
| 553 void BitmapImage::resetAnimation() | 553 void BitmapImage::resetAnimation() |
| 554 { | 554 { |
| 555 stopAnimation(); | 555 stopAnimation(); |
| 556 m_currentFrame = 0; | 556 m_currentFrame = 0; |
| 557 m_repetitionsComplete = 0; | 557 m_repetitionsComplete = 0; |
| 558 m_desiredFrameStartTime = 0; | 558 m_desiredFrameStartTime = 0; |
| 559 m_animationFinished = false; | 559 m_animationFinished = false; |
| 560 | 560 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 destroyDecodedDataIfNecessary(); | 620 destroyDecodedDataIfNecessary(); |
| 621 | 621 |
| 622 // We need to draw this frame if we advanced to it while not skipping, or if | 622 // We need to draw this frame if we advanced to it while not skipping, or if |
| 623 // while trying to skip frames we hit the last frame and thus had to stop. | 623 // while trying to skip frames we hit the last frame and thus had to stop. |
| 624 if (skippingFrames != advancedAnimation) | 624 if (skippingFrames != advancedAnimation) |
| 625 getImageObserver()->animationAdvanced(this); | 625 getImageObserver()->animationAdvanced(this); |
| 626 return advancedAnimation; | 626 return advancedAnimation; |
| 627 } | 627 } |
| 628 | 628 |
| 629 } // namespace blink | 629 } // namespace blink |
| OLD | NEW |