Chromium Code Reviews| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 235 m_sampledEffect = nullptr; | 235 m_sampledEffect = nullptr; |
| 236 if (sampledEffect) | 236 if (sampledEffect) |
| 237 sampledEffect->clear(); | 237 sampledEffect->clear(); |
| 238 } | 238 } |
| 239 #endif | 239 #endif |
| 240 | 240 |
| 241 bool KeyframeEffect::isCandidateForAnimationOnCompositor(double animationPlaybac kRate) const | 241 bool KeyframeEffect::isCandidateForAnimationOnCompositor(double animationPlaybac kRate) const |
| 242 { | 242 { |
| 243 if (!model() | 243 if (!model() |
| 244 || !m_target | 244 || !m_target |
| 245 || (m_target->computedStyle() && m_target->computedStyle()->hasMotionPat h())) | 245 || (m_target->computedStyle() && (m_target->computedStyle()->hasMotionPa th() || m_target->computedStyle()->hasTransformProperties()))) |
| 246 return false; | 246 return false; |
| 247 | 247 |
|
Eric Willigers
2015/06/11 02:15:19
applyEffects() also needs changing, in case 'trans
soonm
2015/06/11 23:31:03
Done.
| |
| 248 return CompositorAnimations::instance()->isCandidateForAnimationOnCompositor (specifiedTiming(), *m_target, animation(), *model(), animationPlaybackRate); | 248 return CompositorAnimations::instance()->isCandidateForAnimationOnCompositor (specifiedTiming(), *m_target, animation(), *model(), animationPlaybackRate); |
| 249 } | 249 } |
| 250 | 250 |
| 251 bool KeyframeEffect::maybeStartAnimationOnCompositor(int group, double startTime , double currentTime, double animationPlaybackRate) | 251 bool KeyframeEffect::maybeStartAnimationOnCompositor(int group, double startTime , double currentTime, double animationPlaybackRate) |
| 252 { | 252 { |
| 253 ASSERT(!hasActiveAnimationsOnCompositor()); | 253 ASSERT(!hasActiveAnimationsOnCompositor()); |
| 254 if (!isCandidateForAnimationOnCompositor(animationPlaybackRate)) | 254 if (!isCandidateForAnimationOnCompositor(animationPlaybackRate)) |
| 255 return false; | 255 return false; |
| 256 if (!CompositorAnimations::instance()->canStartAnimationOnCompositor(*m_targ et)) | 256 if (!CompositorAnimations::instance()->canStartAnimationOnCompositor(*m_targ et)) |
| 257 return false; | 257 return false; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 332 | 332 |
| 333 DEFINE_TRACE(KeyframeEffect) | 333 DEFINE_TRACE(KeyframeEffect) |
| 334 { | 334 { |
| 335 visitor->trace(m_target); | 335 visitor->trace(m_target); |
| 336 visitor->trace(m_model); | 336 visitor->trace(m_model); |
| 337 visitor->trace(m_sampledEffect); | 337 visitor->trace(m_sampledEffect); |
| 338 AnimationEffect::trace(visitor); | 338 AnimationEffect::trace(visitor); |
| 339 } | 339 } |
| 340 | 340 |
| 341 } // namespace blink | 341 } // namespace blink |
| OLD | NEW |