Changeset 111362 in webkit


Ignore:
Timestamp:
Mar 19, 2012 11:17:23 PM (12 years ago)
Author:
eae@chromium.org
Message:

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):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r111361 r111362  
     12012-03-19  Emil A Eklund  <eae@chromium.org>
     2
     3        Add FractionalLayoutUnit version of blend to AnimationUtilities
     4        https://bugs.webkit.org/show_bug.cgi?id=81572
     5
     6        Reviewed by Eric Seidel.
     7       
     8        Add version of blend method that operates on FractionalLayoutUnits. This
     9        will be used in place of the integer version in many places once we
     10        enable support for subpixel layout.
     11
     12        No new tests.
     13
     14        * platform/FractionalLayoutUnit.h:
     15        Include math.h to make GTK build happy.
     16
     17        * platform/animation/AnimationUtilities.h:
     18        (WebCore::blend):
     19
    1202012-03-19  Adam Barth  <abarth@webkit.org>
    221
  • trunk/Source/WebCore/platform/FractionalLayoutUnit.h

    r108239 r111362  
    3434#include <limits.h>
    3535#include <limits>
     36#include <math.h>
    3637#include <stdlib.h>
    3738
  • trunk/Source/WebCore/platform/animation/AnimationUtilities.h

    r106672 r111362  
    2727#define AnimationUtilities_h
    2828
     29#include "FractionalLayoutUnit.h"
    2930#include <wtf/MathExtras.h>
    3031
     
    5152}
    5253
     54inline FractionalLayoutUnit blend(FractionalLayoutUnit from, FractionalLayoutUnit to, double progress)
     55
     56    return from + (to - from) * progress;
     57}
     58
    5359} // namespace WebCore
    5460
Note: See TracChangeset for help on using the changeset viewer.