| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 void setStartTime(double); | 68 void setStartTime(double); |
| 69 | 69 |
| 70 TimedItem* source() { return m_content.get(); } | 70 TimedItem* source() { return m_content.get(); } |
| 71 | 71 |
| 72 // Pausing via this method is not reflected in the value returned by | 72 // Pausing via this method is not reflected in the value returned by |
| 73 // paused() and must never overlap with pausing via setPaused(). | 73 // paused() and must never overlap with pausing via setPaused(). |
| 74 void pauseForTesting(); | 74 void pauseForTesting(); |
| 75 // Reflects all pausing, including via pauseForTesting(). | 75 // Reflects all pausing, including via pauseForTesting(). |
| 76 bool pausedInternal() const { return !isNull(m_pauseStartTime); } | 76 bool pausedInternal() const { return !isNull(m_pauseStartTime); } |
| 77 | 77 |
| 78 bool maybeStartCompositorAnimations(); |
| 79 void cancelCompositorAnimations(); |
| 80 |
| 78 private: | 81 private: |
| 79 Player(DocumentTimeline&, TimedItem*); | 82 Player(DocumentTimeline&, TimedItem*); |
| 80 inline double pausedTimeDrift() const; | 83 inline double pausedTimeDrift() const; |
| 81 inline double currentTimeBeforeDrift() const; | 84 inline double currentTimeBeforeDrift() const; |
| 82 | 85 |
| 86 bool isRunningCompositorAnimations(); |
| 87 |
| 83 void setPausedImpl(bool); | 88 void setPausedImpl(bool); |
| 84 | 89 |
| 85 double m_pauseStartTime; | 90 double m_pauseStartTime; |
| 86 double m_playbackRate; | 91 double m_playbackRate; |
| 87 double m_timeDrift; | 92 double m_timeDrift; |
| 88 double m_startTime; | 93 double m_startTime; |
| 89 | 94 |
| 90 RefPtr<TimedItem> m_content; | 95 RefPtr<TimedItem> m_content; |
| 91 DocumentTimeline& m_timeline; | 96 DocumentTimeline& m_timeline; |
| 92 bool m_isPausedForTesting; | 97 bool m_isPausedForTesting; |
| 93 }; | 98 }; |
| 94 | 99 |
| 95 } // namespace | 100 } // namespace |
| 96 | 101 |
| 97 #endif | 102 #endif |
| OLD | NEW |