| 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 24 matching lines...) Expand all Loading... |
| 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" | 41 #include "platform/animation/CompositorAnimationTimeline.h" |
| 42 #include "platform/graphics/CompositorFactory.h" | 42 #include "platform/graphics/CompositorFactory.h" |
| 43 #include "public/platform/Platform.h" | 43 #include "public/platform/Platform.h" |
| 44 #include "public/platform/WebCompositorSupport.h" | 44 #include "public/platform/WebCompositorSupport.h" |
| 45 #include "wtf/PtrUtil.h" |
| 45 #include <algorithm> | 46 #include <algorithm> |
| 46 | 47 |
| 47 namespace blink { | 48 namespace blink { |
| 48 | 49 |
| 49 namespace { | 50 namespace { |
| 50 | 51 |
| 51 bool compareAnimations(const Member<Animation>& left, const Member<Animation>& r
ight) | 52 bool compareAnimations(const Member<Animation>& left, const Member<Animation>& r
ight) |
| 52 { | 53 { |
| 53 return Animation::hasLowerPriority(left.get(), right.get()); | 54 return Animation::hasLowerPriority(left.get(), right.get()); |
| 54 } | 55 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 73 , m_playbackRate(1) | 74 , m_playbackRate(1) |
| 74 , m_lastCurrentTimeInternal(0) | 75 , m_lastCurrentTimeInternal(0) |
| 75 { | 76 { |
| 76 ThreadState::current()->registerPreFinalizer(this); | 77 ThreadState::current()->registerPreFinalizer(this); |
| 77 if (!timing) | 78 if (!timing) |
| 78 m_timing = new AnimationTimelineTiming(this); | 79 m_timing = new AnimationTimelineTiming(this); |
| 79 else | 80 else |
| 80 m_timing = timing; | 81 m_timing = timing; |
| 81 | 82 |
| 82 if (Platform::current()->isThreadedAnimationEnabled()) | 83 if (Platform::current()->isThreadedAnimationEnabled()) |
| 83 m_compositorTimeline = adoptPtr(CompositorFactory::current().createAnima
tionTimeline()); | 84 m_compositorTimeline = wrapUnique(CompositorFactory::current().createAni
mationTimeline()); |
| 84 | 85 |
| 85 ASSERT(document); | 86 ASSERT(document); |
| 86 } | 87 } |
| 87 | 88 |
| 88 AnimationTimeline::~AnimationTimeline() | 89 AnimationTimeline::~AnimationTimeline() |
| 89 { | 90 { |
| 90 } | 91 } |
| 91 | 92 |
| 92 void AnimationTimeline::dispose() | 93 void AnimationTimeline::dispose() |
| 93 { | 94 { |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 | 350 |
| 350 DEFINE_TRACE(AnimationTimeline) | 351 DEFINE_TRACE(AnimationTimeline) |
| 351 { | 352 { |
| 352 visitor->trace(m_document); | 353 visitor->trace(m_document); |
| 353 visitor->trace(m_timing); | 354 visitor->trace(m_timing); |
| 354 visitor->trace(m_animationsNeedingUpdate); | 355 visitor->trace(m_animationsNeedingUpdate); |
| 355 visitor->trace(m_animations); | 356 visitor->trace(m_animations); |
| 356 } | 357 } |
| 357 | 358 |
| 358 } // namespace blink | 359 } // namespace blink |
| OLD | NEW |