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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 return false; | 267 return false; |
268 } | 268 } |
269 } | 269 } |
270 return true; | 270 return true; |
271 } | 271 } |
272 | 272 |
273 Keyframe::PropertySpecificKeyframe::PropertySpecificKeyframe( | 273 Keyframe::PropertySpecificKeyframe::PropertySpecificKeyframe( |
274 double offset, | 274 double offset, |
275 PassRefPtr<TimingFunction> easing, | 275 PassRefPtr<TimingFunction> easing, |
276 EffectModel::CompositeOperation composite) | 276 EffectModel::CompositeOperation composite) |
277 : m_offset(offset), m_easing(easing), m_composite(composite) { | 277 : m_offset(offset), m_easing(std::move(easing)), m_composite(composite) { |
278 DCHECK(!isNull(offset)); | 278 DCHECK(!isNull(offset)); |
279 } | 279 } |
280 | 280 |
281 void KeyframeEffectModelBase::PropertySpecificKeyframeGroup::appendKeyframe( | 281 void KeyframeEffectModelBase::PropertySpecificKeyframeGroup::appendKeyframe( |
282 PassRefPtr<Keyframe::PropertySpecificKeyframe> keyframe) { | 282 PassRefPtr<Keyframe::PropertySpecificKeyframe> keyframe) { |
283 DCHECK(m_keyframes.isEmpty() || | 283 DCHECK(m_keyframes.isEmpty() || |
284 m_keyframes.back()->offset() <= keyframe->offset()); | 284 m_keyframes.back()->offset() <= keyframe->offset()); |
285 m_keyframes.push_back(keyframe); | 285 m_keyframes.push_back(keyframe); |
286 } | 286 } |
287 | 287 |
(...skipping 29 matching lines...) Expand all Loading... |
317 } | 317 } |
318 if (m_keyframes.back()->offset() != 1.0) { | 318 if (m_keyframes.back()->offset() != 1.0) { |
319 appendKeyframe(m_keyframes.back()->neutralKeyframe(1, nullptr)); | 319 appendKeyframe(m_keyframes.back()->neutralKeyframe(1, nullptr)); |
320 addedSyntheticKeyframe = true; | 320 addedSyntheticKeyframe = true; |
321 } | 321 } |
322 | 322 |
323 return addedSyntheticKeyframe; | 323 return addedSyntheticKeyframe; |
324 } | 324 } |
325 | 325 |
326 } // namespace blink | 326 } // namespace blink |
OLD | NEW |