Skip to content
Permalink
Browse files
Add FractionalLayoutUnit version of blend to AnimationUtilities
https://bugs.webkit.org/show_bug.cgi?id=81572

Reviewed by Eric Seidel.

Add version of blend method that operates on FractionalLayoutUnits. This
will be used in place of the integer version in many places once we
enable support for subpixel layout.

No new tests.

* platform/FractionalLayoutUnit.h:
Include math.h to make GTK build happy.

* platform/animation/AnimationUtilities.h:
(WebCore::blend):


Canonical link: https://commits.webkit.org/98884@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eaenet committed Mar 20, 2012
1 parent 645fe66 commit 0bb1b5eac2673ca4f7b55a2f338fd82764017c54
Showing 3 changed files with 26 additions and 0 deletions.
@@ -1,3 +1,22 @@
2012-03-19 Emil A Eklund <eae@chromium.org>

Add FractionalLayoutUnit version of blend to AnimationUtilities
https://bugs.webkit.org/show_bug.cgi?id=81572

Reviewed by Eric Seidel.

Add version of blend method that operates on FractionalLayoutUnits. This
will be used in place of the integer version in many places once we
enable support for subpixel layout.

No new tests.

* platform/FractionalLayoutUnit.h:
Include math.h to make GTK build happy.

* platform/animation/AnimationUtilities.h:
(WebCore::blend):

2012-03-19 Adam Barth <abarth@webkit.org>

Remove support for "magic" iframe
@@ -33,6 +33,7 @@

#include <limits.h>
#include <limits>
#include <math.h>
#include <stdlib.h>

namespace WebCore {
@@ -26,6 +26,7 @@
#ifndef AnimationUtilities_h
#define AnimationUtilities_h

#include "FractionalLayoutUnit.h"
#include <wtf/MathExtras.h>

namespace WebCore {
@@ -50,6 +51,11 @@ inline float blend(float from, float to, double progress)
return static_cast<float>(from + (to - from) * progress);
}

inline FractionalLayoutUnit blend(FractionalLayoutUnit from, FractionalLayoutUnit to, double progress)
{
return from + (to - from) * progress;
}

} // namespace WebCore

#endif // AnimationUtilities_h

0 comments on commit 0bb1b5e

Please sign in to comment.