| 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 27 matching lines...) Expand all Loading... |
| 38 #include "core/events/AnimationPlayerEvent.h" | 38 #include "core/events/AnimationPlayerEvent.h" |
| 39 #include "core/frame/UseCounter.h" | 39 #include "core/frame/UseCounter.h" |
| 40 #include "core/inspector/InspectorInstrumentation.h" | 40 #include "core/inspector/InspectorInstrumentation.h" |
| 41 #include "core/inspector/InspectorTraceEvents.h" | 41 #include "core/inspector/InspectorTraceEvents.h" |
| 42 #include "platform/RuntimeEnabledFeatures.h" | 42 #include "platform/RuntimeEnabledFeatures.h" |
| 43 #include "platform/TraceEvent.h" | 43 #include "platform/TraceEvent.h" |
| 44 #include "platform/animation/CompositorAnimationPlayer.h" | 44 #include "platform/animation/CompositorAnimationPlayer.h" |
| 45 #include "public/platform/Platform.h" | 45 #include "public/platform/Platform.h" |
| 46 #include "public/platform/WebCompositorSupport.h" | 46 #include "public/platform/WebCompositorSupport.h" |
| 47 #include "wtf/MathExtras.h" | 47 #include "wtf/MathExtras.h" |
| 48 #include "wtf/PtrUtil.h" | |
| 49 | 48 |
| 50 namespace blink { | 49 namespace blink { |
| 51 | 50 |
| 52 namespace { | 51 namespace { |
| 53 | 52 |
| 54 static unsigned nextSequenceNumber() | 53 static unsigned nextSequenceNumber() |
| 55 { | 54 { |
| 56 static unsigned next = 0; | 55 static unsigned next = 0; |
| 57 return ++next; | 56 return ++next; |
| 58 } | 57 } |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 m_currentTimePending = false; | 286 m_currentTimePending = false; |
| 288 } | 287 } |
| 289 | 288 |
| 290 if (shouldStart) { | 289 if (shouldStart) { |
| 291 m_compositorGroup = compositorGroup; | 290 m_compositorGroup = compositorGroup; |
| 292 if (startOnCompositor) { | 291 if (startOnCompositor) { |
| 293 if (isCandidateForAnimationOnCompositor()) | 292 if (isCandidateForAnimationOnCompositor()) |
| 294 createCompositorPlayer(); | 293 createCompositorPlayer(); |
| 295 | 294 |
| 296 if (maybeStartAnimationOnCompositor()) | 295 if (maybeStartAnimationOnCompositor()) |
| 297 m_compositorState = wrapUnique(new CompositorState(*this)); | 296 m_compositorState = adoptPtr(new CompositorState(*this)); |
| 298 else | 297 else |
| 299 cancelIncompatibleAnimationsOnCompositor(); | 298 cancelIncompatibleAnimationsOnCompositor(); |
| 300 } | 299 } |
| 301 } | 300 } |
| 302 | 301 |
| 303 return true; | 302 return true; |
| 304 } | 303 } |
| 305 | 304 |
| 306 void Animation::postCommit(double timelineTime) | 305 void Animation::postCommit(double timelineTime) |
| 307 { | 306 { |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1085 visitor->trace(m_timeline); | 1084 visitor->trace(m_timeline); |
| 1086 visitor->trace(m_pendingFinishedEvent); | 1085 visitor->trace(m_pendingFinishedEvent); |
| 1087 visitor->trace(m_pendingCancelledEvent); | 1086 visitor->trace(m_pendingCancelledEvent); |
| 1088 visitor->trace(m_finishedPromise); | 1087 visitor->trace(m_finishedPromise); |
| 1089 visitor->trace(m_readyPromise); | 1088 visitor->trace(m_readyPromise); |
| 1090 EventTargetWithInlineData::trace(visitor); | 1089 EventTargetWithInlineData::trace(visitor); |
| 1091 ActiveDOMObject::trace(visitor); | 1090 ActiveDOMObject::trace(visitor); |
| 1092 } | 1091 } |
| 1093 | 1092 |
| 1094 } // namespace blink | 1093 } // namespace blink |
| OLD | NEW |