Changeset 91880 in webkit


Ignore:
Timestamp:
Jul 27, 2011 4:18:34 PM (13 years ago)
Author:
leviw@chromium.org
Message:

Switch transform operations to FloatSize
https://bugs.webkit.org/show_bug.cgi?id=64301

Reviewed by Simon Fraser.

Changing TransformOperation and its progeny to operate on FloatSizes instead of IntSizes.

  • platform/graphics/transforms/IdentityTransformOperation.h:

(WebCore::IdentityTransformOperation::apply):

  • platform/graphics/transforms/Matrix3DTransformOperation.cpp:

(WebCore::Matrix3DTransformOperation::blend):

  • platform/graphics/transforms/Matrix3DTransformOperation.h:

(WebCore::Matrix3DTransformOperation::apply):

  • platform/graphics/transforms/MatrixTransformOperation.cpp:

(WebCore::MatrixTransformOperation::blend):

  • platform/graphics/transforms/MatrixTransformOperation.h:

(WebCore::MatrixTransformOperation::apply):

  • platform/graphics/transforms/PerspectiveTransformOperation.h:

(WebCore::PerspectiveTransformOperation::apply):

  • platform/graphics/transforms/RotateTransformOperation.h:

(WebCore::RotateTransformOperation::apply):

  • platform/graphics/transforms/ScaleTransformOperation.h:

(WebCore::ScaleTransformOperation::apply):

  • platform/graphics/transforms/SkewTransformOperation.h:

(WebCore::SkewTransformOperation::apply):

  • platform/graphics/transforms/TransformOperation.h:
  • platform/graphics/transforms/TransformOperations.h:

(WebCore::TransformOperations::apply):

  • platform/graphics/transforms/TranslateTransformOperation.h:

(WebCore::TranslateTransformOperation::x):
(WebCore::TranslateTransformOperation::y):
(WebCore::TranslateTransformOperation::z):
(WebCore::TranslateTransformOperation::apply):

Location:
trunk/Source/WebCore
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r91879 r91880  
     12011-07-27  Levi Weintraub  <leviw@chromium.org>
     2
     3        Switch transform operations to FloatSize
     4        https://bugs.webkit.org/show_bug.cgi?id=64301
     5
     6        Reviewed by Simon Fraser.
     7
     8        Changing TransformOperation and its progeny to operate on FloatSizes instead of IntSizes.
     9
     10        * platform/graphics/transforms/IdentityTransformOperation.h:
     11        (WebCore::IdentityTransformOperation::apply):
     12        * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
     13        (WebCore::Matrix3DTransformOperation::blend):
     14        * platform/graphics/transforms/Matrix3DTransformOperation.h:
     15        (WebCore::Matrix3DTransformOperation::apply):
     16        * platform/graphics/transforms/MatrixTransformOperation.cpp:
     17        (WebCore::MatrixTransformOperation::blend):
     18        * platform/graphics/transforms/MatrixTransformOperation.h:
     19        (WebCore::MatrixTransformOperation::apply):
     20        * platform/graphics/transforms/PerspectiveTransformOperation.h:
     21        (WebCore::PerspectiveTransformOperation::apply):
     22        * platform/graphics/transforms/RotateTransformOperation.h:
     23        (WebCore::RotateTransformOperation::apply):
     24        * platform/graphics/transforms/ScaleTransformOperation.h:
     25        (WebCore::ScaleTransformOperation::apply):
     26        * platform/graphics/transforms/SkewTransformOperation.h:
     27        (WebCore::SkewTransformOperation::apply):
     28        * platform/graphics/transforms/TransformOperation.h:
     29        * platform/graphics/transforms/TransformOperations.h:
     30        (WebCore::TransformOperations::apply):
     31        * platform/graphics/transforms/TranslateTransformOperation.h:
     32        (WebCore::TranslateTransformOperation::x):
     33        (WebCore::TranslateTransformOperation::y):
     34        (WebCore::TranslateTransformOperation::z):
     35        (WebCore::TranslateTransformOperation::apply):
     36
    1372011-07-27  Levi Weintraub  <leviw@chromium.org>
    238
  • trunk/Source/WebCore/platform/graphics/transforms/IdentityTransformOperation.h

    r39635 r91880  
    4747    }
    4848
    49     virtual bool apply(TransformationMatrix&, const IntSize&) const
     49    virtual bool apply(TransformationMatrix&, const FloatSize&) const
    5050    {
    5151        return false;
  • trunk/Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.cpp

    r46590 r91880  
    3939
    4040    // Convert the TransformOperations into matrices
    41     IntSize size;
     41    FloatSize size;
    4242    TransformationMatrix fromT;
    4343    TransformationMatrix toT;
  • trunk/Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.h

    r76537 r91880  
    5454    }
    5555
    56     virtual bool apply(TransformationMatrix& transform, const IntSize&) const
     56    virtual bool apply(TransformationMatrix& transform, const FloatSize&) const
    5757    {
    5858        transform.multiply(TransformationMatrix(m_matrix));
  • trunk/Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.cpp

    r46590 r91880  
    3535
    3636    // convert the TransformOperations into matrices
    37     IntSize size;
     37    FloatSize size;
    3838    TransformationMatrix fromT;
    3939    TransformationMatrix toT(m_a, m_b, m_c, m_d, m_e, m_f);
  • trunk/Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.h

    r76537 r91880  
    6060    }
    6161
    62     virtual bool apply(TransformationMatrix& transform, const IntSize&) const
     62    virtual bool apply(TransformationMatrix& transform, const FloatSize&) const
    6363    {
    6464        TransformationMatrix matrix(m_a, m_b, m_c, m_d, m_e, m_f);
  • trunk/Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.h

    r76568 r91880  
    5454    }
    5555
    56     virtual bool apply(TransformationMatrix& transform, const IntSize&) const
     56    virtual bool apply(TransformationMatrix& transform, const FloatSize&) const
    5757    {
    5858        transform.applyPerspective(m_p.calcFloatValue(1));
  • trunk/Source/WebCore/platform/graphics/transforms/RotateTransformOperation.h

    r69884 r91880  
    6161    }
    6262
    63     virtual bool apply(TransformationMatrix& transform, const IntSize& /*borderBoxSize*/) const
     63    virtual bool apply(TransformationMatrix& transform, const FloatSize& /*borderBoxSize*/) const
    6464    {
    6565        transform.rotate3d(m_x, m_y, m_z, m_angle);
  • trunk/Source/WebCore/platform/graphics/transforms/ScaleTransformOperation.h

    r40939 r91880  
    6060    }
    6161
    62     virtual bool apply(TransformationMatrix& transform, const IntSize&) const
     62    virtual bool apply(TransformationMatrix& transform, const FloatSize&) const
    6363    {
    6464        transform.scale3d(m_x, m_y, m_z);
  • trunk/Source/WebCore/platform/graphics/transforms/SkewTransformOperation.h

    r69884 r91880  
    5353    }
    5454
    55     virtual bool apply(TransformationMatrix& transform, const IntSize&) const
     55    virtual bool apply(TransformationMatrix& transform, const FloatSize&) const
    5656    {
    5757        transform.skew(m_angleX, m_angleY);
  • trunk/Source/WebCore/platform/graphics/transforms/TransformOperation.h

    r40939 r91880  
    2626#define TransformOperation_h
    2727
     28#include "FloatSize.h"
    2829#include "TransformationMatrix.h"
    29 #include "IntSize.h"
    3030#include <wtf/PassRefPtr.h>
    3131#include <wtf/RefCounted.h>
     
    6060
    6161    // Return true if the borderBoxSize was used in the computation, false otherwise.
    62     virtual bool apply(TransformationMatrix&, const IntSize& borderBoxSize) const = 0;
     62    virtual bool apply(TransformationMatrix&, const FloatSize& borderBoxSize) const = 0;
    6363
    6464    virtual PassRefPtr<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) = 0;
  • trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.h

    r76248 r91880  
    4343    }
    4444   
    45     void apply(const IntSize& sz, TransformationMatrix& t) const
     45    void apply(const FloatSize& sz, TransformationMatrix& t) const
    4646    {
    4747        for (unsigned i = 0; i < m_operations.size(); ++i)
  • trunk/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h

    r69884 r91880  
    4343    }
    4444
    45     double x(const IntSize& borderBoxSize) const { return m_x.calcFloatValue(borderBoxSize.width()); }
    46     double y(const IntSize& borderBoxSize) const { return m_y.calcFloatValue(borderBoxSize.height()); }
    47     double z(const IntSize&) const { return m_z.calcFloatValue(1); }
     45    double x(const FloatSize& borderBoxSize) const { return m_x.calcFloatValue(borderBoxSize.width()); }
     46    double y(const FloatSize& borderBoxSize) const { return m_y.calcFloatValue(borderBoxSize.height()); }
     47    double z(const FloatSize&) const { return m_z.calcFloatValue(1); }
    4848
    4949    Length x() const { return m_x; }
     
    6565    }
    6666
    67     virtual bool apply(TransformationMatrix& transform, const IntSize& borderBoxSize) const
     67    virtual bool apply(TransformationMatrix& transform, const FloatSize& borderBoxSize) const
    6868    {
    6969        transform.translate3d(x(borderBoxSize), y(borderBoxSize), z(borderBoxSize));
Note: See TracChangeset for help on using the changeset viewer.