summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/transforms
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-16 16:25:10 +0100
committerBen Murdoch <benm@google.com>2011-05-23 18:54:14 +0100
commitab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb (patch)
treedb769fadd053248f85db67434a5b275224defef7 /Source/WebCore/platform/graphics/transforms
parent52e2557aeb8477967e97fd24f20f8f407a10fa15 (diff)
downloadexternal_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.zip
external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.gz
external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.bz2
Merge WebKit at r76408: Initial merge by git.
Change-Id: I5b91decbd693ccbf5c1b8354b37cd68cc9a1ea53
Diffstat (limited to 'Source/WebCore/platform/graphics/transforms')
-rw-r--r--Source/WebCore/platform/graphics/transforms/AffineTransform.cpp10
-rw-r--r--Source/WebCore/platform/graphics/transforms/AffineTransform.h13
-rw-r--r--Source/WebCore/platform/graphics/transforms/TransformOperations.h3
-rw-r--r--Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp1
-rw-r--r--Source/WebCore/platform/graphics/transforms/TransformationMatrix.h4
5 files changed, 15 insertions, 16 deletions
diff --git a/Source/WebCore/platform/graphics/transforms/AffineTransform.cpp b/Source/WebCore/platform/graphics/transforms/AffineTransform.cpp
index f275526..3f88140 100644
--- a/Source/WebCore/platform/graphics/transforms/AffineTransform.cpp
+++ b/Source/WebCore/platform/graphics/transforms/AffineTransform.cpp
@@ -164,12 +164,10 @@ AffineTransform AffineTransform::inverse() const
return result;
}
-AffineTransform& AffineTransform::multiply(const AffineTransform& other)
-{
- return (*this) *= other;
-}
-AffineTransform& AffineTransform::multLeft(const AffineTransform& other)
+// Multiplies this AffineTransform by the provided AffineTransform - i.e.
+// this = this * other;
+AffineTransform& AffineTransform::multiply(const AffineTransform& other)
{
AffineTransform trans;
@@ -192,7 +190,7 @@ AffineTransform& AffineTransform::rotate(double a)
double sinAngle = sin(a);
AffineTransform rot(cosAngle, sinAngle, -sinAngle, cosAngle, 0, 0);
- multLeft(rot);
+ multiply(rot);
return *this;
}
diff --git a/Source/WebCore/platform/graphics/transforms/AffineTransform.h b/Source/WebCore/platform/graphics/transforms/AffineTransform.h
index baee102..50d0655 100644
--- a/Source/WebCore/platform/graphics/transforms/AffineTransform.h
+++ b/Source/WebCore/platform/graphics/transforms/AffineTransform.h
@@ -55,7 +55,8 @@ class IntPoint;
class IntRect;
class TransformationMatrix;
-class AffineTransform : public FastAllocBase {
+class AffineTransform {
+ WTF_MAKE_FAST_ALLOCATED;
public:
typedef double Transform[6];
@@ -95,8 +96,7 @@ public:
void makeIdentity();
- AffineTransform& multiply(const AffineTransform&);
- AffineTransform& multLeft(const AffineTransform&);
+ AffineTransform& multiply(const AffineTransform& other);
AffineTransform& scale(double);
AffineTransform& scale(double sx, double sy);
AffineTransform& scaleNonUniform(double sx, double sy);
@@ -147,15 +147,14 @@ public:
// *this = *this * t (i.e., a multRight)
AffineTransform& operator*=(const AffineTransform& t)
{
- *this = *this * t;
- return *this;
+ return multiply(t);
}
// result = *this * t (i.e., a multRight)
AffineTransform operator*(const AffineTransform& t) const
{
- AffineTransform result = t;
- result.multLeft(*this);
+ AffineTransform result = *this;
+ result *= t;
return result;
}
diff --git a/Source/WebCore/platform/graphics/transforms/TransformOperations.h b/Source/WebCore/platform/graphics/transforms/TransformOperations.h
index c0da377..981e1f6 100644
--- a/Source/WebCore/platform/graphics/transforms/TransformOperations.h
+++ b/Source/WebCore/platform/graphics/transforms/TransformOperations.h
@@ -31,7 +31,8 @@
namespace WebCore {
-class TransformOperations : public FastAllocBase {
+class TransformOperations {
+ WTF_MAKE_FAST_ALLOCATED;
public:
TransformOperations(bool makeIdentity = false);
diff --git a/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp b/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
index 10c7f70..357a140 100644
--- a/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
+++ b/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
@@ -27,6 +27,7 @@
#include "config.h"
#include "TransformationMatrix.h"
+#include "AffineTransform.h"
#include "FloatPoint3D.h"
#include "FloatRect.h"
#include "FloatQuad.h"
diff --git a/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h b/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h
index f13bcc1..c883675 100644
--- a/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h
+++ b/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h
@@ -26,7 +26,6 @@
#ifndef TransformationMatrix_h
#define TransformationMatrix_h
-#include "AffineTransform.h"
#include "FloatPoint.h"
#include "IntPoint.h"
#include <string.h> //for memcpy
@@ -65,7 +64,8 @@ class FloatPoint3D;
class FloatRect;
class FloatQuad;
-class TransformationMatrix : public FastAllocBase {
+class TransformationMatrix {
+ WTF_MAKE_FAST_ALLOCATED;
public:
typedef double Matrix4[4][4];