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 20 matching lines...) Expand all Loading... |
31 #include "core/animation/Animation.h" | 31 #include "core/animation/Animation.h" |
32 | 32 |
33 #include "core/animation/AnimationTimeline.h" | 33 #include "core/animation/AnimationTimeline.h" |
34 #include "core/animation/KeyframeEffect.h" | 34 #include "core/animation/KeyframeEffect.h" |
35 #include "core/dom/Document.h" | 35 #include "core/dom/Document.h" |
36 #include "core/dom/ExceptionCode.h" | 36 #include "core/dom/ExceptionCode.h" |
37 #include "core/events/AnimationPlayerEvent.h" | 37 #include "core/events/AnimationPlayerEvent.h" |
38 #include "core/frame/UseCounter.h" | 38 #include "core/frame/UseCounter.h" |
39 #include "core/inspector/InspectorInstrumentation.h" | 39 #include "core/inspector/InspectorInstrumentation.h" |
40 #include "core/inspector/InspectorTraceEvents.h" | 40 #include "core/inspector/InspectorTraceEvents.h" |
| 41 #include "platform/CompositorFactory.h" |
41 #include "platform/RuntimeEnabledFeatures.h" | 42 #include "platform/RuntimeEnabledFeatures.h" |
42 #include "platform/TraceEvent.h" | 43 #include "platform/TraceEvent.h" |
| 44 #include "platform/animation/WebCompositorAnimationPlayer.h" |
43 #include "public/platform/Platform.h" | 45 #include "public/platform/Platform.h" |
44 #include "public/platform/WebCompositorAnimationPlayer.h" | |
45 #include "public/platform/WebCompositorSupport.h" | 46 #include "public/platform/WebCompositorSupport.h" |
46 #include "wtf/MathExtras.h" | 47 #include "wtf/MathExtras.h" |
47 | 48 |
48 namespace blink { | 49 namespace blink { |
49 | 50 |
50 namespace { | 51 namespace { |
51 | 52 |
52 static unsigned nextSequenceNumber() | 53 static unsigned nextSequenceNumber() |
53 { | 54 { |
54 static unsigned next = 0; | 55 static unsigned next = 0; |
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 void Animation::endUpdatingState() | 915 void Animation::endUpdatingState() |
915 { | 916 { |
916 ASSERT(m_stateIsBeingUpdated); | 917 ASSERT(m_stateIsBeingUpdated); |
917 m_stateIsBeingUpdated = false; | 918 m_stateIsBeingUpdated = false; |
918 } | 919 } |
919 | 920 |
920 void Animation::createCompositorPlayer() | 921 void Animation::createCompositorPlayer() |
921 { | 922 { |
922 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platfor
m::current()->isThreadedAnimationEnabled() && !m_compositorPlayer) { | 923 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platfor
m::current()->isThreadedAnimationEnabled() && !m_compositorPlayer) { |
923 ASSERT(Platform::current()->compositorSupport()); | 924 ASSERT(Platform::current()->compositorSupport()); |
924 m_compositorPlayer = adoptPtr(Platform::current()->compositorSupport()->
createAnimationPlayer()); | 925 m_compositorPlayer = adoptPtr(CompositorFactory::current().createAnimati
onPlayer()); |
925 ASSERT(m_compositorPlayer); | 926 ASSERT(m_compositorPlayer); |
926 m_compositorPlayer->setAnimationDelegate(this); | 927 m_compositorPlayer->setAnimationDelegate(this); |
927 attachCompositorTimeline(); | 928 attachCompositorTimeline(); |
928 } | 929 } |
929 | 930 |
930 attachCompositedLayers(); | 931 attachCompositedLayers(); |
931 } | 932 } |
932 | 933 |
933 void Animation::destroyCompositorPlayer() | 934 void Animation::destroyCompositorPlayer() |
934 { | 935 { |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1095 visitor->trace(m_content); | 1096 visitor->trace(m_content); |
1096 visitor->trace(m_timeline); | 1097 visitor->trace(m_timeline); |
1097 visitor->trace(m_pendingFinishedEvent); | 1098 visitor->trace(m_pendingFinishedEvent); |
1098 visitor->trace(m_finishedPromise); | 1099 visitor->trace(m_finishedPromise); |
1099 visitor->trace(m_readyPromise); | 1100 visitor->trace(m_readyPromise); |
1100 RefCountedGarbageCollectedEventTargetWithInlineData<Animation>::trace(visito
r); | 1101 RefCountedGarbageCollectedEventTargetWithInlineData<Animation>::trace(visito
r); |
1101 ActiveDOMObject::trace(visitor); | 1102 ActiveDOMObject::trace(visitor); |
1102 } | 1103 } |
1103 | 1104 |
1104 } // namespace blink | 1105 } // namespace blink |
OLD | NEW |