| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 | 288 |
| 289 return CompositorAnimations::CheckCanStartAnimationOnCompositor( | 289 return CompositorAnimations::CheckCanStartAnimationOnCompositor( |
| 290 SpecifiedTiming(), *target_, GetAnimation(), *Model(), | 290 SpecifiedTiming(), *target_, GetAnimation(), *Model(), |
| 291 animation_playback_rate); | 291 animation_playback_rate); |
| 292 } | 292 } |
| 293 | 293 |
| 294 void KeyframeEffectReadOnly::StartAnimationOnCompositor( | 294 void KeyframeEffectReadOnly::StartAnimationOnCompositor( |
| 295 int group, | 295 int group, |
| 296 double start_time, | 296 double start_time, |
| 297 double current_time, | 297 double current_time, |
| 298 double animation_playback_rate) { | 298 double animation_playback_rate, |
| 299 CompositorAnimationPlayer* compositor_player) { |
| 299 DCHECK(!HasActiveAnimationsOnCompositor()); | 300 DCHECK(!HasActiveAnimationsOnCompositor()); |
| 300 DCHECK(CheckCanStartAnimationOnCompositor(animation_playback_rate).Ok()); | 301 DCHECK(CheckCanStartAnimationOnCompositor(animation_playback_rate).Ok()); |
| 301 | 302 |
| 302 CompositorAnimations::StartAnimationOnCompositor( | 303 CompositorAnimations::StartAnimationOnCompositor( |
| 303 *target_, group, start_time, current_time, SpecifiedTiming(), | 304 *target_, group, start_time, current_time, SpecifiedTiming(), |
| 304 *GetAnimation(), *Model(), compositor_animation_ids_, | 305 GetAnimation(), compositor_player, *Model(), compositor_animation_ids_, |
| 305 animation_playback_rate); | 306 animation_playback_rate); |
| 306 DCHECK(!compositor_animation_ids_.IsEmpty()); | 307 DCHECK(!compositor_animation_ids_.IsEmpty()); |
| 307 } | 308 } |
| 308 | 309 |
| 309 bool KeyframeEffectReadOnly::HasActiveAnimationsOnCompositor() const { | 310 bool KeyframeEffectReadOnly::HasActiveAnimationsOnCompositor() const { |
| 310 return !compositor_animation_ids_.IsEmpty(); | 311 return !compositor_animation_ids_.IsEmpty(); |
| 311 } | 312 } |
| 312 | 313 |
| 313 bool KeyframeEffectReadOnly::HasActiveAnimationsOnCompositor( | 314 bool KeyframeEffectReadOnly::HasActiveAnimationsOnCompositor( |
| 314 const PropertyHandle& property) const { | 315 const PropertyHandle& property) const { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 } | 369 } |
| 369 | 370 |
| 370 DEFINE_TRACE(KeyframeEffectReadOnly) { | 371 DEFINE_TRACE(KeyframeEffectReadOnly) { |
| 371 visitor->Trace(target_); | 372 visitor->Trace(target_); |
| 372 visitor->Trace(model_); | 373 visitor->Trace(model_); |
| 373 visitor->Trace(sampled_effect_); | 374 visitor->Trace(sampled_effect_); |
| 374 AnimationEffectReadOnly::Trace(visitor); | 375 AnimationEffectReadOnly::Trace(visitor); |
| 375 } | 376 } |
| 376 | 377 |
| 377 } // namespace blink | 378 } // namespace blink |
| OLD | NEW |