OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 } | 274 } |
275 | 275 |
276 private: | 276 private: |
277 double scaleToLocal(double x) const { return (x - m_min) / (m_max - m_mi
n); } | 277 double scaleToLocal(double x) const { return (x - m_min) / (m_max - m_mi
n); } |
278 double scaleFromLocal(double x) const { return blend(m_min, m_max, x); } | 278 double scaleFromLocal(double x) const { return blend(m_min, m_max, x); } |
279 | 279 |
280 double m_min; | 280 double m_min; |
281 double m_max; | 281 double m_max; |
282 RefPtr<TimingFunction> m_timingFunction; | 282 RefPtr<TimingFunction> m_timingFunction; |
283 | 283 |
| 284 // Allow the compositor to reverse the timing function. |
| 285 friend class CompositorAnimationsTimingFunctionReverser; |
| 286 |
284 // Allow PrintTo/operator== of the segments. Can be removed once | 287 // Allow PrintTo/operator== of the segments. Can be removed once |
285 // ChainedTimingFunction has a public API for segments. | 288 // ChainedTimingFunction has a public API for segments. |
286 friend class ChainedTimingFunctionTestHelper; | 289 friend class ChainedTimingFunctionTestHelper; |
287 }; | 290 }; |
288 | 291 |
289 ChainedTimingFunction() | 292 ChainedTimingFunction() |
290 : TimingFunction(ChainedFunction) | 293 : TimingFunction(ChainedFunction) |
291 { | 294 { |
292 ASSERT(RuntimeEnabledFeatures::webAnimationsEnabled()); | 295 ASSERT(RuntimeEnabledFeatures::webAnimationsEnabled()); |
293 } | 296 } |
294 | 297 |
295 Vector<Segment> m_segments; | 298 Vector<Segment> m_segments; |
296 | 299 |
| 300 // Allow the compositor to reverse the timing function. |
| 301 friend class CompositorAnimationsTimingFunctionReverser; |
| 302 |
297 // Allow PrintTo/operator== of the segments. Can be removed once | 303 // Allow PrintTo/operator== of the segments. Can be removed once |
298 // ChainedTimingFunction has a public API for segments. | 304 // ChainedTimingFunction has a public API for segments. |
299 friend class ChainedTimingFunctionTestHelper; | 305 friend class ChainedTimingFunctionTestHelper; |
300 }; | 306 }; |
301 | 307 |
302 } // namespace WebCore | 308 } // namespace WebCore |
303 | 309 |
304 #endif // TimingFunction_h | 310 #endif // TimingFunction_h |
OLD | NEW |