OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 // stringent. | 105 // stringent. |
106 double fireTime = 0; | 106 double fireTime = 0; |
107 if (m_image->hasAnimations()) { | 107 if (m_image->hasAnimations()) { |
108 if (m_timelineState >= Suspended) | 108 if (m_timelineState >= Suspended) |
109 return; | 109 return; |
110 fireTime = animationFrameDelay; | 110 fireTime = animationFrameDelay; |
111 } | 111 } |
112 m_animationTimer->startOneShot(fireTime, BLINK_FROM_HERE); | 112 m_animationTimer->startOneShot(fireTime, BLINK_FROM_HERE); |
113 } | 113 } |
114 | 114 |
115 void SVGImageChromeClient::setTimer(Timer<SVGImageChromeClient>* timer) | 115 void SVGImageChromeClient::setTimer(TaskRunnerTimer<SVGImageChromeClient>* timer
) |
116 { | 116 { |
117 m_animationTimer = wrapUnique(timer); | 117 m_animationTimer = wrapUnique(timer); |
118 } | 118 } |
119 | 119 |
120 void SVGImageChromeClient::animationTimerFired(Timer<SVGImageChromeClient>*) | 120 void SVGImageChromeClient::animationTimerFired(TimerBase*) |
121 { | 121 { |
122 if (!m_image) | 122 if (!m_image) |
123 return; | 123 return; |
124 | 124 |
125 // The SVGImageChromeClient object's lifetime is dependent on | 125 // The SVGImageChromeClient object's lifetime is dependent on |
126 // the ImageObserver (an ImageResource) of its image. Should it | 126 // the ImageObserver (an ImageResource) of its image. Should it |
127 // be dead and about to be lazily swept out, do not proceed. | 127 // be dead and about to be lazily swept out, do not proceed. |
128 // | 128 // |
129 // TODO(Oilpan): move (SVG)Image to the Oilpan heap, and avoid | 129 // TODO(Oilpan): move (SVG)Image to the Oilpan heap, and avoid |
130 // this explicit lifetime check. | 130 // this explicit lifetime check. |
131 if (ThreadHeap::willObjectBeLazilySwept(m_image->getImageObserver())) | 131 if (ThreadHeap::willObjectBeLazilySwept(m_image->getImageObserver())) |
132 return; | 132 return; |
133 | 133 |
134 m_image->serviceAnimations(monotonicallyIncreasingTime()); | 134 m_image->serviceAnimations(monotonicallyIncreasingTime()); |
135 } | 135 } |
136 | 136 |
137 } // namespace blink | 137 } // namespace blink |
OLD | NEW |