| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 } | 246 } |
| 247 #endif | 247 #endif |
| 248 | 248 |
| 249 bool Animation::isCandidateForAnimationOnCompositor(double playerPlaybackRate) c
onst | 249 bool Animation::isCandidateForAnimationOnCompositor(double playerPlaybackRate) c
onst |
| 250 { | 250 { |
| 251 if (!effect() || !m_target) | 251 if (!effect() || !m_target) |
| 252 return false; | 252 return false; |
| 253 return CompositorAnimations::instance()->isCandidateForAnimationOnCompositor
(specifiedTiming(), *effect(), playerPlaybackRate); | 253 return CompositorAnimations::instance()->isCandidateForAnimationOnCompositor
(specifiedTiming(), *effect(), playerPlaybackRate); |
| 254 } | 254 } |
| 255 | 255 |
| 256 bool Animation::maybeStartAnimationOnCompositor(double startTime, double current
Time) | 256 bool Animation::maybeStartAnimationOnCompositor(int group, double startTime, dou
ble currentTime, double playerPlaybackRate) |
| 257 { | |
| 258 return maybeStartAnimationOnCompositor(startTime, currentTime, 1); | |
| 259 } | |
| 260 | |
| 261 bool Animation::maybeStartAnimationOnCompositor(double startTime, double current
Time, double playerPlaybackRate) | |
| 262 { | 257 { |
| 263 ASSERT(!hasActiveAnimationsOnCompositor()); | 258 ASSERT(!hasActiveAnimationsOnCompositor()); |
| 264 if (!isCandidateForAnimationOnCompositor(playerPlaybackRate)) | 259 if (!isCandidateForAnimationOnCompositor(playerPlaybackRate)) |
| 265 return false; | 260 return false; |
| 266 if (!CompositorAnimations::instance()->canStartAnimationOnCompositor(*m_targ
et)) | 261 if (!CompositorAnimations::instance()->canStartAnimationOnCompositor(*m_targ
et)) |
| 267 return false; | 262 return false; |
| 268 if (!CompositorAnimations::instance()->startAnimationOnCompositor(*m_target,
startTime, currentTime, specifiedTiming(), *effect(), m_compositorAnimationIds,
playerPlaybackRate)) | 263 if (!CompositorAnimations::instance()->startAnimationOnCompositor(*m_target,
group, startTime, currentTime, specifiedTiming(), *effect(), m_compositorAnimat
ionIds, playerPlaybackRate)) |
| 269 return false; | 264 return false; |
| 270 ASSERT(!m_compositorAnimationIds.isEmpty()); | 265 ASSERT(!m_compositorAnimationIds.isEmpty()); |
| 271 return true; | 266 return true; |
| 272 } | 267 } |
| 273 | 268 |
| 274 bool Animation::hasActiveAnimationsOnCompositor() const | 269 bool Animation::hasActiveAnimationsOnCompositor() const |
| 275 { | 270 { |
| 276 return !m_compositorAnimationIds.isEmpty(); | 271 return !m_compositorAnimationIds.isEmpty(); |
| 277 } | 272 } |
| 278 | 273 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 | 308 |
| 314 void Animation::trace(Visitor* visitor) | 309 void Animation::trace(Visitor* visitor) |
| 315 { | 310 { |
| 316 visitor->trace(m_target); | 311 visitor->trace(m_target); |
| 317 visitor->trace(m_effect); | 312 visitor->trace(m_effect); |
| 318 visitor->trace(m_sampledEffect); | 313 visitor->trace(m_sampledEffect); |
| 319 AnimationNode::trace(visitor); | 314 AnimationNode::trace(visitor); |
| 320 } | 315 } |
| 321 | 316 |
| 322 } // namespace blink | 317 } // namespace blink |
| OLD | NEW |