| 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 23 matching lines...) Expand all Loading... |
| 34 #include <algorithm> | 34 #include <algorithm> |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 bool AnimatableFilterOperations::usesDefaultInterpolationWith(const AnimatableVa
lue* value) const | 38 bool AnimatableFilterOperations::usesDefaultInterpolationWith(const AnimatableVa
lue* value) const |
| 39 { | 39 { |
| 40 const AnimatableFilterOperations* target = toAnimatableFilterOperations(valu
e); | 40 const AnimatableFilterOperations* target = toAnimatableFilterOperations(valu
e); |
| 41 return !operations().canInterpolateWith(target->operations()); | 41 return !operations().canInterpolateWith(target->operations()); |
| 42 } | 42 } |
| 43 | 43 |
| 44 PassRefPtrWillBeRawPtr<AnimatableValue> AnimatableFilterOperations::interpolateT
o(const AnimatableValue* value, double fraction) const | 44 AnimatableValue* AnimatableFilterOperations::interpolateTo(const AnimatableValue
* value, double fraction) const |
| 45 { | 45 { |
| 46 if (usesDefaultInterpolationWith(value)) | 46 if (usesDefaultInterpolationWith(value)) |
| 47 return defaultInterpolateTo(this, value, fraction); | 47 return defaultInterpolateTo(this, value, fraction); |
| 48 | 48 |
| 49 const AnimatableFilterOperations* target = toAnimatableFilterOperations(valu
e); | 49 const AnimatableFilterOperations* target = toAnimatableFilterOperations(valu
e); |
| 50 FilterOperations result; | 50 FilterOperations result; |
| 51 size_t fromSize = operations().size(); | 51 size_t fromSize = operations().size(); |
| 52 size_t toSize = target->operations().size(); | 52 size_t toSize = target->operations().size(); |
| 53 size_t size = std::max(fromSize, toSize); | 53 size_t size = std::max(fromSize, toSize); |
| 54 for (size_t i = 0; i < size; i++) { | 54 for (size_t i = 0; i < size; i++) { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 68 return operations() == toAnimatableFilterOperations(value)->operations(); | 68 return operations() == toAnimatableFilterOperations(value)->operations(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 DEFINE_TRACE(AnimatableFilterOperations) | 71 DEFINE_TRACE(AnimatableFilterOperations) |
| 72 { | 72 { |
| 73 visitor->trace(m_operations); | 73 visitor->trace(m_operations); |
| 74 AnimatableValue::trace(visitor); | 74 AnimatableValue::trace(visitor); |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace blink | 77 } // namespace blink |
| OLD | NEW |