Chromium Code Reviews| 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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 576 // startAnimation() again to keep the animation moving. | 576 // startAnimation() again to keep the animation moving. |
| 577 } | 577 } |
| 578 | 578 |
| 579 bool BitmapImage::internalAdvanceAnimation(bool skippingFrames) | 579 bool BitmapImage::internalAdvanceAnimation(bool skippingFrames) |
| 580 { | 580 { |
| 581 // Stop the animation. | 581 // Stop the animation. |
| 582 stopAnimation(); | 582 stopAnimation(); |
| 583 | 583 |
| 584 // See if anyone is still paying attention to this animation. If not, we do n't | 584 // See if anyone is still paying attention to this animation. If not, we do n't |
| 585 // advance and will remain suspended at the current frame until the animatio n is resumed. | 585 // advance and will remain suspended at the current frame until the animatio n is resumed. |
| 586 if (!skippingFrames && imageObserver()->shouldPauseAnimation(this)) | 586 if (!skippingFrames && imageObserver()->shouldPauseAnimation(this, m_current Frame == frameCount()-1)) |
|
dmazzoni
2014/11/24 17:50:48
spaces around the minus sign: frameCount() - 1
je_julie(Not used)
2014/11/27 17:22:50
Done.
| |
| 587 return false; | 587 return false; |
| 588 | 588 |
| 589 ++m_currentFrame; | 589 ++m_currentFrame; |
| 590 bool advancedAnimation = true; | 590 bool advancedAnimation = true; |
| 591 if (m_currentFrame >= frameCount()) { | 591 if (m_currentFrame >= frameCount()) { |
| 592 ++m_repetitionsComplete; | 592 ++m_repetitionsComplete; |
| 593 | 593 |
| 594 // Get the repetition count again. If we weren't able to get a | 594 // Get the repetition count again. If we weren't able to get a |
| 595 // repetition count before, we should have decoded the whole image by | 595 // repetition count before, we should have decoded the whole image by |
| 596 // now, so it should now be available. | 596 // now, so it should now be available. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 642 | 642 |
| 643 return m_isSolidColor && !m_currentFrame; | 643 return m_isSolidColor && !m_currentFrame; |
| 644 } | 644 } |
| 645 | 645 |
| 646 Color BitmapImage::solidColor() const | 646 Color BitmapImage::solidColor() const |
| 647 { | 647 { |
| 648 return m_solidColor; | 648 return m_solidColor; |
| 649 } | 649 } |
| 650 | 650 |
| 651 } // namespace blink | 651 } // namespace blink |
| OLD | NEW |