Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Side by Side Diff: Source/core/animation/InterpolationEffect.cpp

Issue 851693007: Prepare for responsive CSS animations. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/animation/InterpolationEffect.h" 6 #include "core/animation/InterpolationEffect.h"
7 7
8 #include "core/animation/DeferredLegacyStyleInterpolation.h"
9 #include "core/animation/StyleInterpolation.h"
10
8 namespace blink { 11 namespace blink {
9 12
10 void InterpolationEffect::getActiveInterpolations(double fraction, double iterat ionDuration, OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolatio n>>>& result) const 13 void InterpolationEffect::getActiveInterpolations(double fraction, double iterat ionDuration, OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolatio n>>>& result) const
11 { 14 {
12 if (!result) 15 if (!result)
13 result = adoptPtrWillBeNoop(new WillBeHeapVector<RefPtrWillBeMember<Inte rpolation> >()); 16 result = adoptPtrWillBeNoop(new WillBeHeapVector<RefPtrWillBeMember<Inte rpolation> >());
14 17
15 size_t existingSize = result->size(); 18 size_t existingSize = result->size();
16 size_t resultIndex = 0; 19 size_t resultIndex = 0;
17 20
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 71 }
69 72
70 addInterpolation(interpolation.release(), 73 addInterpolation(interpolation.release(),
71 &keyframeA.easing(), regionStart, regionEnd, regionApplyFrom, re gionApplyTo); 74 &keyframeA.easing(), regionStart, regionEnd, regionApplyFrom, re gionApplyTo);
72 75
73 regionIndex++; 76 regionIndex++;
74 } 77 }
75 } 78 }
76 } 79 }
77 80
81 void InterpolationEffect::setDeferredInterpolationsOutdated()
82 {
83 for (auto& record : m_interpolations) {
84 if (record->m_interpolation->isStyleInterpolation() && toStyleInterpolat ion(record->m_interpolation.get())->isDeferredLegacyStyleInterpolation())
85 toDeferredLegacyStyleInterpolation(toStyleInterpolation(record->m_in terpolation.get()))->setOutdated();
86 }
87 }
88
78 void InterpolationEffect::InterpolationRecord::trace(Visitor* visitor) 89 void InterpolationEffect::InterpolationRecord::trace(Visitor* visitor)
79 { 90 {
80 visitor->trace(m_interpolation); 91 visitor->trace(m_interpolation);
81 } 92 }
82 93
83 void InterpolationEffect::trace(Visitor* visitor) 94 void InterpolationEffect::trace(Visitor* visitor)
84 { 95 {
85 #if ENABLE_OILPAN 96 #if ENABLE_OILPAN
86 visitor->trace(m_interpolations); 97 visitor->trace(m_interpolations);
87 #endif 98 #endif
88 } 99 }
89 100
90 } 101 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698