| 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 26 matching lines...) Expand all Loading... |
| 37 namespace { | 37 namespace { |
| 38 | 38 |
| 39 const double defaultDistance = 1; | 39 const double defaultDistance = 1; |
| 40 | 40 |
| 41 } // namespace | 41 } // namespace |
| 42 | 42 |
| 43 namespace WebCore { | 43 namespace WebCore { |
| 44 | 44 |
| 45 const AnimatableValue* AnimatableValue::neutralValue() | 45 const AnimatableValue* AnimatableValue::neutralValue() |
| 46 { | 46 { |
| 47 #if ENABLE_OILPAN | 47 DEFINE_STATIC_REF_WILL_BE_PERSISTENT(AnimatableNeutral, neutralSentinelValue
, (AnimatableNeutral::create())); |
| 48 DEFINE_STATIC_LOCAL(Persistent<AnimatableNeutral>, neutralSentinelValue, (An
imatableNeutral::create())); | |
| 49 return neutralSentinelValue.get(); | |
| 50 #else | |
| 51 DEFINE_STATIC_REF(AnimatableNeutral, neutralSentinelValue, (AnimatableNeutra
l::create())); | |
| 52 return neutralSentinelValue; | 48 return neutralSentinelValue; |
| 53 #endif | |
| 54 } | 49 } |
| 55 | 50 |
| 56 PassRefPtrWillBeRawPtr<AnimatableValue> AnimatableValue::interpolate(const Anima
tableValue* left, const AnimatableValue* right, double fraction) | 51 PassRefPtrWillBeRawPtr<AnimatableValue> AnimatableValue::interpolate(const Anima
tableValue* left, const AnimatableValue* right, double fraction) |
| 57 { | 52 { |
| 58 ASSERT(left); | 53 ASSERT(left); |
| 59 ASSERT(right); | 54 ASSERT(right); |
| 60 ASSERT(!left->isNeutral()); | 55 ASSERT(!left->isNeutral()); |
| 61 ASSERT(!right->isNeutral()); | 56 ASSERT(!right->isNeutral()); |
| 62 | 57 |
| 63 if (fraction && fraction != 1 && left->isSameType(right)) | 58 if (fraction && fraction != 1 && left->isSameType(right)) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 76 | 71 |
| 77 return defaultDistance; | 72 return defaultDistance; |
| 78 } | 73 } |
| 79 | 74 |
| 80 double AnimatableValue::distanceTo(const AnimatableValue*) const | 75 double AnimatableValue::distanceTo(const AnimatableValue*) const |
| 81 { | 76 { |
| 82 return defaultDistance; | 77 return defaultDistance; |
| 83 } | 78 } |
| 84 | 79 |
| 85 } // namespace WebCore | 80 } // namespace WebCore |
| OLD | NEW |