| 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   372     DCHECK(std::isnan(m_startTime)); |   372     DCHECK(std::isnan(m_startTime)); | 
|   373     DCHECK(m_held); |   373     DCHECK(m_held); | 
|   374  |   374  | 
|   375     if (m_playbackRate == 0) { |   375     if (m_playbackRate == 0) { | 
|   376       setStartTimeInternal(timelineTime); |   376       setStartTimeInternal(timelineTime); | 
|   377     } else { |   377     } else { | 
|   378       setStartTimeInternal(timelineTime + |   378       setStartTimeInternal(timelineTime + | 
|   379                            currentTimeInternal() / -m_playbackRate); |   379                            currentTimeInternal() / -m_playbackRate); | 
|   380     } |   380     } | 
|   381  |   381  | 
|   382     // FIXME: This avoids marking this animation as outdated needlessly when a s
      tart time |   382     // FIXME: This avoids marking this animation as outdated needlessly when a | 
|   383     // is notified, but we should refactor how outdating works to avoid this. |   383     // start time is notified, but we should refactor how outdating works to | 
 |   384     // avoid this. | 
|   384     clearOutdated(); |   385     clearOutdated(); | 
|   385     m_currentTimePending = false; |   386     m_currentTimePending = false; | 
|   386   } |   387   } | 
|   387 } |   388 } | 
|   388  |   389  | 
|   389 bool Animation::affects(const Element& element, CSSPropertyID property) const { |   390 bool Animation::affects(const Element& element, CSSPropertyID property) const { | 
|   390   if (!m_content || !m_content->isKeyframeEffect()) |   391   if (!m_content || !m_content->isKeyframeEffect()) | 
|   391     return false; |   392     return false; | 
|   392  |   393  | 
|   393   const KeyframeEffect* effect = toKeyframeEffect(m_content.get()); |   394   const KeyframeEffect* effect = toKeyframeEffect(m_content.get()); | 
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   889 } |   890 } | 
|   890  |   891  | 
|   891 void Animation::endUpdatingState() { |   892 void Animation::endUpdatingState() { | 
|   892   DCHECK(m_stateIsBeingUpdated); |   893   DCHECK(m_stateIsBeingUpdated); | 
|   893   m_stateIsBeingUpdated = false; |   894   m_stateIsBeingUpdated = false; | 
|   894 } |   895 } | 
|   895  |   896  | 
|   896 void Animation::createCompositorPlayer() { |   897 void Animation::createCompositorPlayer() { | 
|   897   if (Platform::current()->isThreadedAnimationEnabled() && |   898   if (Platform::current()->isThreadedAnimationEnabled() && | 
|   898       !m_compositorPlayer) { |   899       !m_compositorPlayer) { | 
|   899     // We only need to pre-finalize if we are running animations on the composit
      or. |   900     // We only need to pre-finalize if we are running animations on the | 
 |   901     // compositor. | 
|   900     if (!m_preFinalizerRegistered) { |   902     if (!m_preFinalizerRegistered) { | 
|   901       ThreadState::current()->registerPreFinalizer(this); |   903       ThreadState::current()->registerPreFinalizer(this); | 
|   902       m_preFinalizerRegistered = true; |   904       m_preFinalizerRegistered = true; | 
|   903     } |   905     } | 
|   904  |   906  | 
|   905     DCHECK(Platform::current()->compositorSupport()); |   907     DCHECK(Platform::current()->compositorSupport()); | 
|   906     m_compositorPlayer = CompositorAnimationPlayer::create(); |   908     m_compositorPlayer = CompositorAnimationPlayer::create(); | 
|   907     DCHECK(m_compositorPlayer); |   909     DCHECK(m_compositorPlayer); | 
|   908     m_compositorPlayer->setAnimationDelegate(this); |   910     m_compositorPlayer->setAnimationDelegate(this); | 
|   909     attachCompositorTimeline(); |   911     attachCompositorTimeline(); | 
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1109   visitor->trace(m_timeline); |  1111   visitor->trace(m_timeline); | 
|  1110   visitor->trace(m_pendingFinishedEvent); |  1112   visitor->trace(m_pendingFinishedEvent); | 
|  1111   visitor->trace(m_pendingCancelledEvent); |  1113   visitor->trace(m_pendingCancelledEvent); | 
|  1112   visitor->trace(m_finishedPromise); |  1114   visitor->trace(m_finishedPromise); | 
|  1113   visitor->trace(m_readyPromise); |  1115   visitor->trace(m_readyPromise); | 
|  1114   EventTargetWithInlineData::trace(visitor); |  1116   EventTargetWithInlineData::trace(visitor); | 
|  1115   ActiveDOMObject::trace(visitor); |  1117   ActiveDOMObject::trace(visitor); | 
|  1116 } |  1118 } | 
|  1117  |  1119  | 
|  1118 }  // namespace blink |  1120 }  // namespace blink | 
| OLD | NEW |