| 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 "core/animation/Animation.h" | 9 #include "core/animation/Animation.h" |
| 10 #include "core/animation/CompositorAnimations.h" | 10 #include "core/animation/CompositorAnimations.h" |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 *model(), m_compositorAnimationIds, animationPlaybackRate); | 306 *model(), m_compositorAnimationIds, animationPlaybackRate); |
| 307 DCHECK(!m_compositorAnimationIds.isEmpty()); | 307 DCHECK(!m_compositorAnimationIds.isEmpty()); |
| 308 return true; | 308 return true; |
| 309 } | 309 } |
| 310 | 310 |
| 311 bool KeyframeEffectReadOnly::hasActiveAnimationsOnCompositor() const { | 311 bool KeyframeEffectReadOnly::hasActiveAnimationsOnCompositor() const { |
| 312 return !m_compositorAnimationIds.isEmpty(); | 312 return !m_compositorAnimationIds.isEmpty(); |
| 313 } | 313 } |
| 314 | 314 |
| 315 bool KeyframeEffectReadOnly::hasActiveAnimationsOnCompositor( | 315 bool KeyframeEffectReadOnly::hasActiveAnimationsOnCompositor( |
| 316 CSSPropertyID property) const { | 316 const PropertyHandle& property) const { |
| 317 return hasActiveAnimationsOnCompositor() && affects(PropertyHandle(property)); | 317 return hasActiveAnimationsOnCompositor() && affects(property); |
| 318 } | 318 } |
| 319 | 319 |
| 320 bool KeyframeEffectReadOnly::affects(PropertyHandle property) const { | 320 bool KeyframeEffectReadOnly::affects(const PropertyHandle& property) const { |
| 321 return m_model && m_model->affects(property); | 321 return m_model && m_model->affects(property); |
| 322 } | 322 } |
| 323 | 323 |
| 324 bool KeyframeEffectReadOnly::cancelAnimationOnCompositor() { | 324 bool KeyframeEffectReadOnly::cancelAnimationOnCompositor() { |
| 325 // FIXME: cancelAnimationOnCompositor is called from withins style recalc. | 325 // FIXME: cancelAnimationOnCompositor is called from withins style recalc. |
| 326 // This queries compositingState, which is not necessarily up to date. | 326 // This queries compositingState, which is not necessarily up to date. |
| 327 // https://code.google.com/p/chromium/issues/detail?id=339847 | 327 // https://code.google.com/p/chromium/issues/detail?id=339847 |
| 328 DisableCompositingQueryAsserts disabler; | 328 DisableCompositingQueryAsserts disabler; |
| 329 if (!hasActiveAnimationsOnCompositor()) | 329 if (!hasActiveAnimationsOnCompositor()) |
| 330 return false; | 330 return false; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 } | 370 } |
| 371 | 371 |
| 372 DEFINE_TRACE(KeyframeEffectReadOnly) { | 372 DEFINE_TRACE(KeyframeEffectReadOnly) { |
| 373 visitor->trace(m_target); | 373 visitor->trace(m_target); |
| 374 visitor->trace(m_model); | 374 visitor->trace(m_model); |
| 375 visitor->trace(m_sampledEffect); | 375 visitor->trace(m_sampledEffect); |
| 376 AnimationEffectReadOnly::trace(visitor); | 376 AnimationEffectReadOnly::trace(visitor); |
| 377 } | 377 } |
| 378 | 378 |
| 379 } // namespace blink | 379 } // namespace blink |
| OLD | NEW |