| 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/AnimationTimeline.h" | 31 #include "core/animation/AnimationTimeline.h" |
| 32 | 32 |
| 33 #include "core/animation/AnimationClock.h" | 33 #include "core/animation/AnimationClock.h" |
| 34 #include "core/animation/ElementAnimations.h" | 34 #include "core/animation/ElementAnimations.h" |
| 35 #include "core/dom/Document.h" | 35 #include "core/dom/Document.h" |
| 36 #include "core/frame/FrameView.h" | 36 #include "core/frame/FrameView.h" |
| 37 #include "core/loader/DocumentLoader.h" | 37 #include "core/loader/DocumentLoader.h" |
| 38 #include "core/page/Page.h" | 38 #include "core/page/Page.h" |
| 39 #include "platform/RuntimeEnabledFeatures.h" | 39 #include "platform/RuntimeEnabledFeatures.h" |
| 40 #include "platform/TraceEvent.h" | 40 #include "platform/TraceEvent.h" |
| 41 #include "platform/animation/CompositorAnimationTimeline.h" |
| 42 #include "platform/graphics/CompositorFactory.h" |
| 41 #include "public/platform/Platform.h" | 43 #include "public/platform/Platform.h" |
| 42 #include "public/platform/WebCompositorAnimationTimeline.h" | |
| 43 #include "public/platform/WebCompositorSupport.h" | 44 #include "public/platform/WebCompositorSupport.h" |
| 44 #include <algorithm> | 45 #include <algorithm> |
| 45 | 46 |
| 46 namespace blink { | 47 namespace blink { |
| 47 | 48 |
| 48 namespace { | 49 namespace { |
| 49 | 50 |
| 50 bool compareAnimations(const Member<Animation>& left, const Member<Animation>& r
ight) | 51 bool compareAnimations(const Member<Animation>& left, const Member<Animation>& r
ight) |
| 51 { | 52 { |
| 52 return Animation::hasLowerPriority(left.get(), right.get()); | 53 return Animation::hasLowerPriority(left.get(), right.get()); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 71 , m_outdatedAnimationCount(0) | 72 , m_outdatedAnimationCount(0) |
| 72 , m_playbackRate(1) | 73 , m_playbackRate(1) |
| 73 , m_lastCurrentTimeInternal(0) | 74 , m_lastCurrentTimeInternal(0) |
| 74 { | 75 { |
| 75 ThreadState::current()->registerPreFinalizer(this); | 76 ThreadState::current()->registerPreFinalizer(this); |
| 76 if (!timing) | 77 if (!timing) |
| 77 m_timing = new AnimationTimelineTiming(this); | 78 m_timing = new AnimationTimelineTiming(this); |
| 78 else | 79 else |
| 79 m_timing = timing; | 80 m_timing = timing; |
| 80 | 81 |
| 81 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platfor
m::current()->isThreadedAnimationEnabled()) { | 82 if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled() && Platfor
m::current()->isThreadedAnimationEnabled()) |
| 82 ASSERT(Platform::current()->compositorSupport()); | 83 m_compositorTimeline = adoptPtr(CompositorFactory::current().createAnima
tionTimeline()); |
| 83 m_compositorTimeline = adoptPtr(Platform::current()->compositorSupport()
->createAnimationTimeline()); | |
| 84 } | |
| 85 | 84 |
| 86 ASSERT(document); | 85 ASSERT(document); |
| 87 } | 86 } |
| 88 | 87 |
| 89 AnimationTimeline::~AnimationTimeline() | 88 AnimationTimeline::~AnimationTimeline() |
| 90 { | 89 { |
| 91 } | 90 } |
| 92 | 91 |
| 93 void AnimationTimeline::dispose() | 92 void AnimationTimeline::dispose() |
| 94 { | 93 { |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 | 357 |
| 359 DEFINE_TRACE(AnimationTimeline) | 358 DEFINE_TRACE(AnimationTimeline) |
| 360 { | 359 { |
| 361 visitor->trace(m_document); | 360 visitor->trace(m_document); |
| 362 visitor->trace(m_timing); | 361 visitor->trace(m_timing); |
| 363 visitor->trace(m_animationsNeedingUpdate); | 362 visitor->trace(m_animationsNeedingUpdate); |
| 364 visitor->trace(m_animations); | 363 visitor->trace(m_animations); |
| 365 } | 364 } |
| 366 | 365 |
| 367 } // namespace blink | 366 } // namespace blink |
| OLD | NEW |