Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(527)

Side by Side Diff: Source/core/animation/animatable/AnimatableFilterOperations.cpp

Issue 1120003002: [Oilpan] Migrate most classes under core/animations to Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/animation/animatable/AnimatableFilterOperations.h ('k') | Source/core/animation/animatable/AnimatableImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698