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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 } | 304 } |
305 | 305 |
306 bool KeyframeEffectModelBase::PropertySpecificKeyframeGroup:: | 306 bool KeyframeEffectModelBase::PropertySpecificKeyframeGroup:: |
307 addSyntheticKeyframeIfRequired( | 307 addSyntheticKeyframeIfRequired( |
308 PassRefPtr<TimingFunction> zeroOffsetEasing) { | 308 PassRefPtr<TimingFunction> zeroOffsetEasing) { |
309 DCHECK(!m_keyframes.isEmpty()); | 309 DCHECK(!m_keyframes.isEmpty()); |
310 | 310 |
311 bool addedSyntheticKeyframe = false; | 311 bool addedSyntheticKeyframe = false; |
312 | 312 |
313 if (m_keyframes.front()->offset() != 0.0) { | 313 if (m_keyframes.front()->offset() != 0.0) { |
314 m_keyframes.insert(0, m_keyframes.front()->neutralKeyframe( | 314 m_keyframes.insert( |
315 0, std::move(zeroOffsetEasing))); | 315 0, |
| 316 m_keyframes.front()->neutralKeyframe(0, std::move(zeroOffsetEasing))); |
316 addedSyntheticKeyframe = true; | 317 addedSyntheticKeyframe = true; |
317 } | 318 } |
318 if (m_keyframes.back()->offset() != 1.0) { | 319 if (m_keyframes.back()->offset() != 1.0) { |
319 appendKeyframe(m_keyframes.back()->neutralKeyframe(1, nullptr)); | 320 appendKeyframe(m_keyframes.back()->neutralKeyframe(1, nullptr)); |
320 addedSyntheticKeyframe = true; | 321 addedSyntheticKeyframe = true; |
321 } | 322 } |
322 | 323 |
323 return addedSyntheticKeyframe; | 324 return addedSyntheticKeyframe; |
324 } | 325 } |
325 | 326 |
326 } // namespace blink | 327 } // namespace blink |
OLD | NEW |