| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/animation/KeyframeEffectReadOnly.h" | 5 #include "core/animation/KeyframeEffectReadOnly.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/Dictionary.h" | 7 #include "bindings/core/v8/Dictionary.h" |
| 8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
| 9 #include "bindings/core/v8/UnrestrictedDoubleOrKeyframeEffectOptions.h" | 9 #include "bindings/core/v8/UnrestrictedDoubleOrKeyframeEffectOptions.h" |
| 10 #include "core/animation/Animation.h" | 10 #include "core/animation/Animation.h" |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 | 273 |
| 274 return CompositorAnimations::IsCandidateForAnimationOnCompositor( | 274 return CompositorAnimations::IsCandidateForAnimationOnCompositor( |
| 275 SpecifiedTiming(), *target_, GetAnimation(), *Model(), | 275 SpecifiedTiming(), *target_, GetAnimation(), *Model(), |
| 276 animation_playback_rate); | 276 animation_playback_rate); |
| 277 } | 277 } |
| 278 | 278 |
| 279 bool KeyframeEffectReadOnly::MaybeStartAnimationOnCompositor( | 279 bool KeyframeEffectReadOnly::MaybeStartAnimationOnCompositor( |
| 280 int group, | 280 int group, |
| 281 double start_time, | 281 double start_time, |
| 282 double current_time, | 282 double current_time, |
| 283 double animation_playback_rate) { | 283 double animation_playback_rate, |
| 284 CompositorAnimationPlayer* compositor_player) { |
| 284 DCHECK(!HasActiveAnimationsOnCompositor()); | 285 DCHECK(!HasActiveAnimationsOnCompositor()); |
| 285 if (!IsCandidateForAnimationOnCompositor(animation_playback_rate)) | 286 if (!IsCandidateForAnimationOnCompositor(animation_playback_rate)) |
| 286 return false; | 287 return false; |
| 287 if (!CompositorAnimations::CanStartAnimationOnCompositor(*target_)) | 288 if (!CompositorAnimations::CanStartAnimationOnCompositor(*target_)) |
| 288 return false; | 289 return false; |
| 289 CompositorAnimations::StartAnimationOnCompositor( | 290 CompositorAnimations::StartAnimationOnCompositor( |
| 290 *target_, group, start_time, current_time, SpecifiedTiming(), | 291 *target_, group, start_time, current_time, SpecifiedTiming(), |
| 291 *GetAnimation(), *Model(), compositor_animation_ids_, | 292 GetAnimation(), compositor_player, *Model(), compositor_animation_ids_, |
| 292 animation_playback_rate); | 293 animation_playback_rate); |
| 293 DCHECK(!compositor_animation_ids_.IsEmpty()); | 294 DCHECK(!compositor_animation_ids_.IsEmpty()); |
| 294 return true; | 295 return true; |
| 295 } | 296 } |
| 296 | 297 |
| 297 bool KeyframeEffectReadOnly::HasActiveAnimationsOnCompositor() const { | 298 bool KeyframeEffectReadOnly::HasActiveAnimationsOnCompositor() const { |
| 298 return !compositor_animation_ids_.IsEmpty(); | 299 return !compositor_animation_ids_.IsEmpty(); |
| 299 } | 300 } |
| 300 | 301 |
| 301 bool KeyframeEffectReadOnly::HasActiveAnimationsOnCompositor( | 302 bool KeyframeEffectReadOnly::HasActiveAnimationsOnCompositor( |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 } | 357 } |
| 357 | 358 |
| 358 DEFINE_TRACE(KeyframeEffectReadOnly) { | 359 DEFINE_TRACE(KeyframeEffectReadOnly) { |
| 359 visitor->Trace(target_); | 360 visitor->Trace(target_); |
| 360 visitor->Trace(model_); | 361 visitor->Trace(model_); |
| 361 visitor->Trace(sampled_effect_); | 362 visitor->Trace(sampled_effect_); |
| 362 AnimationEffectReadOnly::Trace(visitor); | 363 AnimationEffectReadOnly::Trace(visitor); |
| 363 } | 364 } |
| 364 | 365 |
| 365 } // namespace blink | 366 } // namespace blink |
| OLD | NEW |