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

Unified Diff: Source/core/svg/SVGAnimatedColor.cpp

Issue 112653005: Cleanup ColorDistance (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/ColorDistance.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGAnimatedColor.cpp
diff --git a/Source/core/svg/SVGAnimatedColor.cpp b/Source/core/svg/SVGAnimatedColor.cpp
index ad478afa9aff9d42834122a742f886417dd08851..8a7f469cc63291d7aa8332bae9b77a344caac626 100644
--- a/Source/core/svg/SVGAnimatedColor.cpp
+++ b/Source/core/svg/SVGAnimatedColor.cpp
@@ -94,7 +94,7 @@ void SVGAnimatedColorAnimator::calculateAnimatedValue(float percentage, unsigned
float animatedAlpha = animatedColor.alpha();
m_animationElement->animateAdditiveNumber(percentage, repeatCount, fromColor.alpha(), toColor.alpha(), toAtEndOfDurationColor.alpha(), animatedAlpha);
- animatedColor = ColorDistance::clampColor(static_cast<int>(roundf(animatedRed)), static_cast<int>(roundf(animatedGreen)), static_cast<int>(roundf(animatedBlue)), static_cast<int>(roundf(animatedAlpha)));
+ animatedColor = makeRGBA(static_cast<int>(roundf(animatedRed)), static_cast<int>(roundf(animatedGreen)), static_cast<int>(roundf(animatedBlue)), static_cast<int>(roundf(animatedAlpha)));
eseidel 2013/12/31 21:59:59 What about the clamping?
}
float SVGAnimatedColorAnimator::calculateDistance(const String& fromString, const String& toString)
@@ -106,7 +106,7 @@ float SVGAnimatedColorAnimator::calculateDistance(const String& fromString, cons
Color to = SVGColor::colorFromRGBColorString(toString);
if (!to.isValid())
return -1;
- return ColorDistance(from, to).distance();
+ return ColorDistance::distance(from, to);
}
}
« no previous file with comments | « Source/core/svg/ColorDistance.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698