| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "core/animation/AnimationTimeline.h" | 32 #include "core/animation/AnimationTimeline.h" |
| 33 | 33 |
| 34 #include "core/animation/AnimationClock.h" | 34 #include "core/animation/AnimationClock.h" |
| 35 #include "core/animation/ElementAnimations.h" | 35 #include "core/animation/ElementAnimations.h" |
| 36 #include "core/dom/Document.h" | 36 #include "core/dom/Document.h" |
| 37 #include "core/frame/FrameView.h" | 37 #include "core/frame/FrameView.h" |
| 38 #include "core/loader/DocumentLoader.h" | 38 #include "core/loader/DocumentLoader.h" |
| 39 #include "core/page/Page.h" | 39 #include "core/page/Page.h" |
| 40 #include "platform/RuntimeEnabledFeatures.h" |
| 40 #include "platform/TraceEvent.h" | 41 #include "platform/TraceEvent.h" |
| 42 #include "public/platform/Platform.h" |
| 43 #include "public/platform/WebCompositorAnimationTimeline.h" |
| 44 #include "public/platform/WebCompositorSupport.h" |
| 41 | 45 |
| 42 namespace blink { | 46 namespace blink { |
| 43 | 47 |
| 44 namespace { | 48 namespace { |
| 45 | 49 |
| 46 bool compareAnimationPlayers(const RefPtrWillBeMember<blink::AnimationPlayer>& l
eft, const RefPtrWillBeMember<blink::AnimationPlayer>& right) | 50 bool compareAnimationPlayers(const RefPtrWillBeMember<blink::AnimationPlayer>& l
eft, const RefPtrWillBeMember<blink::AnimationPlayer>& right) |
| 47 { | 51 { |
| 48 return AnimationPlayer::hasLowerPriority(left.get(), right.get()); | 52 return AnimationPlayer::hasLowerPriority(left.get(), right.get()); |
| 49 } | 53 } |
| 50 | 54 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 65 , m_zeroTime(0) // 0 is used by unit tests which cannot initialize from the
loader | 69 , m_zeroTime(0) // 0 is used by unit tests which cannot initialize from the
loader |
| 66 , m_zeroTimeInitialized(false) | 70 , m_zeroTimeInitialized(false) |
| 67 , m_playbackRate(1) | 71 , m_playbackRate(1) |
| 68 , m_lastCurrentTimeInternal(0) | 72 , m_lastCurrentTimeInternal(0) |
| 69 { | 73 { |
| 70 if (!timing) | 74 if (!timing) |
| 71 m_timing = adoptPtrWillBeNoop(new AnimationTimelineTiming(this)); | 75 m_timing = adoptPtrWillBeNoop(new AnimationTimelineTiming(this)); |
| 72 else | 76 else |
| 73 m_timing = timing; | 77 m_timing = timing; |
| 74 | 78 |
| 79 if (Platform::current()->compositorSupport() && RuntimeEnabledFeatures::comp
ositorAnimationTimelinesEnabled()) |
| 80 m_compositorTimeline = adoptPtr(Platform::current()->compositorSupport()
->createAnimationTimeline()); |
| 81 |
| 75 ASSERT(document); | 82 ASSERT(document); |
| 76 } | 83 } |
| 77 | 84 |
| 78 AnimationTimeline::~AnimationTimeline() | 85 AnimationTimeline::~AnimationTimeline() |
| 79 { | 86 { |
| 80 #if !ENABLE(OILPAN) | 87 #if !ENABLE(OILPAN) |
| 81 for (const auto& player : m_players) | 88 for (const auto& player : m_players) |
| 82 player->timelineDestroyed(); | 89 player->timelineDestroyed(); |
| 83 #endif | 90 #endif |
| 84 } | 91 } |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 { | 319 { |
| 313 #if ENABLE(OILPAN) | 320 #if ENABLE(OILPAN) |
| 314 visitor->trace(m_document); | 321 visitor->trace(m_document); |
| 315 visitor->trace(m_timing); | 322 visitor->trace(m_timing); |
| 316 visitor->trace(m_playersNeedingUpdate); | 323 visitor->trace(m_playersNeedingUpdate); |
| 317 visitor->trace(m_players); | 324 visitor->trace(m_players); |
| 318 #endif | 325 #endif |
| 319 } | 326 } |
| 320 | 327 |
| 321 } // namespace | 328 } // namespace |
| OLD | NEW |