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

Unified Diff: Source/core/animation/InterpolationEffect.cpp

Issue 143573004: [wip] interpolable value refactor. NOT FOR LANDING. Base URL: https://chromium.googlesource.com/chromium/blink.git@interpolationWrap
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/animation/InterpolationEffect.h ('k') | Source/core/animation/KeyframeEffectModel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/InterpolationEffect.cpp
diff --git a/Source/modules/crypto/AesCtrParams.cpp b/Source/core/animation/InterpolationEffect.cpp
similarity index 69%
copy from Source/modules/crypto/AesCtrParams.cpp
copy to Source/core/animation/InterpolationEffect.cpp
index 9c846cb2fdf891264bd8de0ce4f1302e5c8ec555..2b5bdea223ca78d0b9fff14ec779f7f88796d684 100644
--- a/Source/modules/crypto/AesCtrParams.cpp
+++ b/Source/core/animation/InterpolationEffect.cpp
@@ -29,31 +29,24 @@
*/
#include "config.h"
-#include "modules/crypto/AesCtrParams.h"
-
-#include "public/platform/WebCryptoAlgorithmParams.h"
+#include "core/animation/InterpolationEffect.h"
namespace WebCore {
-Uint8Array* AesCtrParams::counter()
+PassOwnPtr<Vector<RefPtr<Interpolation> > > InterpolationEffect::getActiveInterpolations(double fraction) const
{
- if (!m_counter) {
- const blink::WebVector<unsigned char>& counter = m_algorithm.aesCtrParams()->counter();
- m_counter = Uint8Array::create(counter.data(), counter.size());
+
+ Vector<RefPtr<Interpolation> >* result = new Vector<RefPtr<Interpolation> >();
+
+ for (size_t i = 0; i < m_interpolations.size(); ++i) {
+ if (fraction >= m_interpolations[i]->m_start && fraction <= m_interpolations[i]->m_end) {
+ RefPtr<Interpolation> interpolation = m_interpolations[i]->m_interpolation;
+ interpolation->interpolate(0, (fraction - m_interpolations[i]->m_start) / (m_interpolations[i]->m_end - m_interpolations[i]->m_start));
+ result->append(interpolation);
+ }
}
- return m_counter.get();
-}
-unsigned char AesCtrParams::length()
-{
- return m_algorithm.aesCtrParams()->lengthBits();
+ return adoptPtr(result);
}
-AesCtrParams::AesCtrParams(const blink::WebCryptoAlgorithm& algorithm)
- : Algorithm(algorithm)
-{
- ASSERT(algorithm.aesCtrParams());
- ScriptWrappable::init(this);
}
-
-} // namespace WebCore
« no previous file with comments | « Source/core/animation/InterpolationEffect.h ('k') | Source/core/animation/KeyframeEffectModel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698