Diff
Modified: trunk/Source/Platform/ChangeLog (145441 => 145442)
--- trunk/Source/Platform/ChangeLog 2013-03-12 00:16:50 UTC (rev 145441)
+++ trunk/Source/Platform/ChangeLog 2013-03-12 00:45:33 UTC (rev 145442)
@@ -1,3 +1,25 @@
+2013-03-11 James Robinson <[email protected]>
+
+ [chromium] Use SkMatrix44 instead of WebTransformationMatrix in animation APIs
+ https://bugs.webkit.org/show_bug.cgi?id=111791
+
+ Reviewed by Adrienne Walker.
+
+ This adds SkMatrix44 overrides for animation APIs that deal with matrices and slims the interface
+ down for WebTransformationMatrix to the minimum needed to compile. With this patch, there are no
+ live codepaths that use WebTransformationMatrix but some downstream code still needs a type and a
+ few functions to compile. After the downstream code is patched this type can go away completely.
+
+ * chromium/public/WebLayer.h:
+ (WebKit):
+ (WebLayer):
+ * chromium/public/WebTransformAnimationCurve.h:
+ (WebTransformAnimationCurve):
+ * chromium/public/WebTransformOperations.h:
+ (WebTransformOperations):
+ * chromium/public/WebTransformationMatrix.h:
+ (WebTransformationMatrix):
+
2013-03-08 Harald Alvestrand <[email protected]>
Implemented new API for RTCStatsReport object.
Modified: trunk/Source/Platform/chromium/public/WebLayer.h (145441 => 145442)
--- trunk/Source/Platform/chromium/public/WebLayer.h 2013-03-12 00:16:50 UTC (rev 145441)
+++ trunk/Source/Platform/chromium/public/WebLayer.h 2013-03-12 00:45:33 UTC (rev 145442)
@@ -42,7 +42,6 @@
class WebAnimationDelegate;
class WebFilterOperations;
class WebLayerScrollClient;
-class WebTransformationMatrix;
struct WebFloatPoint;
struct WebFloatRect;
struct WebSize;
@@ -94,11 +93,9 @@
virtual WebFloatPoint position() const = 0;
virtual void setSublayerTransform(const SkMatrix44&) = 0;
- virtual void setSublayerTransform(const WebTransformationMatrix&) = 0;
virtual SkMatrix44 sublayerTransform() const = 0;
virtual void setTransform(const SkMatrix44&) = 0;
- virtual void setTransform(const WebTransformationMatrix&) = 0;
virtual SkMatrix44 transform() const = 0;
// Sets whether the layer draws its content when compositing.
Modified: trunk/Source/Platform/chromium/public/WebTransformAnimationCurve.h (145441 => 145442)
--- trunk/Source/Platform/chromium/public/WebTransformAnimationCurve.h 2013-03-12 00:16:50 UTC (rev 145441)
+++ trunk/Source/Platform/chromium/public/WebTransformAnimationCurve.h 2013-03-12 00:45:33 UTC (rev 145442)
@@ -29,7 +29,6 @@
#include "WebCommon.h"
#include "WebTransformKeyframe.h"
-#include "WebTransformationMatrix.h"
namespace WebKit {
@@ -44,9 +43,6 @@
// Adds the keyframe with a custom, bezier timing function. Note, it is
// assumed that x0 = y0 = 0, and x3 = y3 = 1.
virtual void add(const WebTransformKeyframe&, double x1, double y1, double x2, double y2) = 0;
-
- virtual WebTransformationMatrix getValue(double time) const = 0;
-
};
} // namespace WebKit
Modified: trunk/Source/Platform/chromium/public/WebTransformOperations.h (145441 => 145442)
--- trunk/Source/Platform/chromium/public/WebTransformOperations.h 2013-03-12 00:16:50 UTC (rev 145441)
+++ trunk/Source/Platform/chromium/public/WebTransformOperations.h 2013-03-12 00:45:33 UTC (rev 145442)
@@ -25,7 +25,7 @@
#ifndef WebTransformOperations_h
#define WebTransformOperations_h
-#include "WebTransformationMatrix.h"
+class SkMatrix44;
#define WEB_TRANSFORM_OPERATIONS_IS_VIRTUAL 1
@@ -45,7 +45,7 @@
virtual void appendScale(double x, double y, double z) = 0;
virtual void appendSkew(double x, double y) = 0;
virtual void appendPerspective(double depth) = 0;
- virtual void appendMatrix(const WebTransformationMatrix&) = 0;
+ virtual void appendMatrix(const SkMatrix44&) = 0;
virtual void appendIdentity() = 0;
virtual bool isIdentity() const = 0;
Modified: trunk/Source/Platform/chromium/public/WebTransformationMatrix.h (145441 => 145442)
--- trunk/Source/Platform/chromium/public/WebTransformationMatrix.h 2013-03-12 00:16:50 UTC (rev 145441)
+++ trunk/Source/Platform/chromium/public/WebTransformationMatrix.h 2013-03-12 00:45:33 UTC (rev 145442)
@@ -47,48 +47,11 @@
class WebTransformationMatrix {
public:
WEBKIT_EXPORT WebTransformationMatrix();
- WEBKIT_EXPORT WebTransformationMatrix(double a, double b, double c, double d, double e, double f);
- WEBKIT_EXPORT WebTransformationMatrix(double m11, double m12, double m13, double m14,
- double m21, double m22, double m23, double m24,
- double m31, double m32, double m33, double m34,
- double m41, double m42, double m43, double m44);
WEBKIT_EXPORT WebTransformationMatrix(const WebTransformationMatrix&);
~WebTransformationMatrix() { reset(); }
WEBKIT_EXPORT void reset();
- // Operations that return a separate matrix and do not modify this one.
- WEBKIT_EXPORT WebTransformationMatrix inverse() const;
- WEBKIT_EXPORT WebTransformationMatrix to2dTransform() const;
-
- WEBKIT_EXPORT WebTransformationMatrix& operator=(const WebTransformationMatrix&);
- WEBKIT_EXPORT bool operator==(const WebTransformationMatrix&) const;
- WEBKIT_EXPORT WebTransformationMatrix operator*(const WebTransformationMatrix&) const;
-
- // Operations that modify this matrix
- WEBKIT_EXPORT void multiply(const WebTransformationMatrix&);
- WEBKIT_EXPORT void makeIdentity();
- WEBKIT_EXPORT void translate(double tx, double ty);
- WEBKIT_EXPORT void translate3d(double tx, double ty, double tz);
- WEBKIT_EXPORT void translateRight3d(double tx, double ty, double tz);
- WEBKIT_EXPORT void scale(double s);
- WEBKIT_EXPORT void scaleNonUniform(double sx, double sy);
- WEBKIT_EXPORT void scale3d(double sx, double sy, double sz);
- WEBKIT_EXPORT void rotate(double angle);
- WEBKIT_EXPORT void rotate3d(double rx, double ry, double rz);
- WEBKIT_EXPORT void rotate3d(double x, double y, double z, double angle);
- WEBKIT_EXPORT void skewX(double angle);
- WEBKIT_EXPORT void skewY(double angle);
- WEBKIT_EXPORT void applyPerspective(double p);
- WEBKIT_EXPORT bool blend(const WebTransformationMatrix& from, double progress);
-
- WEBKIT_EXPORT bool hasPerspective() const;
- WEBKIT_EXPORT bool isInvertible() const;
- WEBKIT_EXPORT bool isBackFaceVisible() const;
- WEBKIT_EXPORT bool isIdentity() const;
- WEBKIT_EXPORT bool isIdentityOrTranslation() const;
- WEBKIT_EXPORT bool isIntegerTranslation() const;
-
// Accessors
WEBKIT_EXPORT double m11() const;
WEBKIT_EXPORT void setM11(double);
Modified: trunk/Source/WebCore/ChangeLog (145441 => 145442)
--- trunk/Source/WebCore/ChangeLog 2013-03-12 00:16:50 UTC (rev 145441)
+++ trunk/Source/WebCore/ChangeLog 2013-03-12 00:45:33 UTC (rev 145442)
@@ -1,3 +1,26 @@
+2013-03-11 James Robinson <[email protected]>
+
+ [chromium] Use SkMatrix44 instead of WebTransformationMatrix in animation APIs
+ https://bugs.webkit.org/show_bug.cgi?id=111791
+
+ Reviewed by Adrienne Walker.
+
+ Adds a new utility function to convert a TransformationMatrix to an SkMatrix44 and
+ uses it in AnimationTranslationUtil and GraphicsLayerChromium.
+
+ * WebCore.gypi:
+ * platform/chromium/support/WebTransformationMatrix.cpp:
+ (WebKit::WebTransformationMatrix::WebTransformationMatrix):
+ * platform/graphics/chromium/AnimationTranslationUtil.cpp:
+ (WebCore::toWebTransformOperations):
+ * platform/graphics/chromium/GraphicsLayerChromium.cpp:
+ (WebCore::GraphicsLayerChromium::updateTransform):
+ (WebCore::GraphicsLayerChromium::updateChildrenTransform):
+ * platform/graphics/chromium/TransformSkMatrix44Conversions.cpp:
+ (WebCore::TransformSkMatrix44Conversions::convert):
+ * platform/graphics/chromium/TransformSkMatrix44Conversions.h:
+ (TransformSkMatrix44Conversions):
+
2013-03-11 Sheriff Bot <[email protected]>
Unreviewed, rolling out r145435.
Modified: trunk/Source/WebCore/WebCore.gypi (145441 => 145442)
--- trunk/Source/WebCore/WebCore.gypi 2013-03-12 00:16:50 UTC (rev 145441)
+++ trunk/Source/WebCore/WebCore.gypi 2013-03-12 00:45:33 UTC (rev 145442)
@@ -4054,6 +4054,8 @@
'platform/graphics/chromium/SimpleFontDataChromiumWin.cpp',
'platform/graphics/chromium/ThreadSafeDataTransport.cpp',
'platform/graphics/chromium/ThreadSafeDataTransport.h',
+ 'platform/graphics/chromium/TransformSkMatrix44Conversions.cpp',
+ 'platform/graphics/chromium/TransformSkMatrix44Conversions.h',
'platform/graphics/chromium/TransparencyWin.cpp',
'platform/graphics/chromium/TransparencyWin.h',
'platform/graphics/chromium/UniscribeHelper.cpp',
Modified: trunk/Source/WebCore/platform/chromium/support/WebTransformationMatrix.cpp (145441 => 145442)
--- trunk/Source/WebCore/platform/chromium/support/WebTransformationMatrix.cpp 2013-03-12 00:16:50 UTC (rev 145441)
+++ trunk/Source/WebCore/platform/chromium/support/WebTransformationMatrix.cpp 2013-03-12 00:45:33 UTC (rev 145442)
@@ -37,24 +37,11 @@
{
}
-WebTransformationMatrix::WebTransformationMatrix(double a, double b, double c, double d, double e, double f)
- : m_private(new TransformationMatrix(a, b, c, d, e, f))
+WebTransformationMatrix::WebTransformationMatrix(const WebTransformationMatrix& matrix)
+ : m_private(new TransformationMatrix(*matrix.m_private.get()))
{
}
-WebTransformationMatrix::WebTransformationMatrix(double m11, double m12, double m13, double m14,
- double m21, double m22, double m23, double m24,
- double m31, double m32, double m33, double m34,
- double m41, double m42, double m43, double m44)
- : m_private(new TransformationMatrix(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44))
-{
-}
-
-WebTransformationMatrix::WebTransformationMatrix(const WebTransformationMatrix& t)
- : m_private(new TransformationMatrix(*t.m_private.get()))
-{
-}
-
WebTransformationMatrix::WebTransformationMatrix(const TransformationMatrix& t)
: m_private(new TransformationMatrix(t))
{
@@ -65,368 +52,84 @@
m_private.reset(0);
}
-WebTransformationMatrix& WebTransformationMatrix::operator=(const WebTransformationMatrix& t)
-{
- m_private.reset(new TransformationMatrix(*t.m_private.get()));
- return *this;
-}
-
-bool WebTransformationMatrix::operator==(const WebTransformationMatrix& t) const
-{
- return *m_private.get() == *t.m_private.get();
-}
-
-WebTransformationMatrix WebTransformationMatrix::operator*(const WebTransformationMatrix& t) const
-{
- WebTransformationMatrix result = *this;
- result.multiply(t);
- return result;
-}
-
-WebTransformationMatrix WebTransformationMatrix::inverse() const
-{
- return WebTransformationMatrix(m_private->inverse());
-}
-
-WebTransformationMatrix WebTransformationMatrix::to2dTransform() const
-{
- WebTransformationMatrix result;
- result.m_private.reset(new TransformationMatrix(m_private->to2dTransform()));
- return result;
-}
-
-void WebTransformationMatrix::multiply(const WebTransformationMatrix& t)
-{
- m_private->multiply(*t.m_private.get());
-}
-
-void WebTransformationMatrix::makeIdentity()
-{
- m_private->makeIdentity();
-}
-
-void WebTransformationMatrix::translate(double tx, double ty)
-{
- m_private->translate(tx, ty);
-}
-
-void WebTransformationMatrix::translate3d(double tx, double ty, double tz)
-{
- m_private->translate3d(tx, ty, tz);
-}
-
-void WebTransformationMatrix::translateRight3d(double tx, double ty, double tz)
-{
- m_private->translateRight3d(tx, ty, tz);
-}
-
-void WebTransformationMatrix::scale(double s)
-{
- m_private->scale(s);
-}
-
-void WebTransformationMatrix::scaleNonUniform(double sx, double sy)
-{
- m_private->scaleNonUniform(sx, sy);
-}
-
-void WebTransformationMatrix::scale3d(double sx, double sy, double sz)
-{
- m_private->scale3d(sx, sy, sz);
-}
-
-void WebTransformationMatrix::rotate(double angle)
-{
- m_private->rotate(angle);
-}
-
-void WebTransformationMatrix::rotate3d(double rx, double ry, double rz)
-{
- m_private->rotate3d(rx, ry, rz);
-}
-
-void WebTransformationMatrix::rotate3d(double x, double y, double z, double angle)
-{
- m_private->rotate3d(x, y, z, angle);
-}
-
-void WebTransformationMatrix::skewX(double angle)
-{
- m_private->skewX(angle);
-}
-
-void WebTransformationMatrix::skewY(double angle)
-{
- m_private->skewY(angle);
-}
-
-void WebTransformationMatrix::applyPerspective(double p)
-{
- m_private->applyPerspective(p);
-}
-
-bool WebTransformationMatrix::blend(const WebTransformationMatrix& from, double progress)
-{
- WebCore::TransformationMatrix::DecomposedType dummy;
- if (!m_private->decompose(dummy) || !from.m_private->decompose(dummy))
- return false;
- m_private->blend(*from.m_private.get(), progress);
- return true;
-}
-
-bool WebTransformationMatrix::hasPerspective() const
-{
- return m_private->hasPerspective();
-}
-
-bool WebTransformationMatrix::isInvertible() const
-{
- return m_private->isInvertible();
-}
-
-bool WebTransformationMatrix::isBackFaceVisible() const
-{
- return m_private->isBackFaceVisible();
-}
-
-bool WebTransformationMatrix::isIdentity() const
-{
- return m_private->isIdentity();
-}
-
-bool WebTransformationMatrix::isIdentityOrTranslation() const
-{
- return m_private->isIdentityOrTranslation();
-}
-
-bool WebTransformationMatrix::isIntegerTranslation() const
-{
- return m_private->isIntegerTranslation();
-}
-
double WebTransformationMatrix::m11() const
{
return m_private->m11();
}
-void WebTransformationMatrix::setM11(double f)
-{
- m_private->setM11(f);
-}
-
double WebTransformationMatrix::m12() const
{
return m_private->m12();
}
-void WebTransformationMatrix::setM12(double f)
-{
- m_private->setM12(f);
-}
-
double WebTransformationMatrix::m13() const
{
return m_private->m13();
}
-void WebTransformationMatrix::setM13(double f)
-{
- m_private->setM13(f);
-}
-
double WebTransformationMatrix::m14() const
{
return m_private->m14();
}
-void WebTransformationMatrix::setM14(double f)
-{
- m_private->setM14(f);
-}
-
double WebTransformationMatrix::m21() const
{
return m_private->m21();
}
-void WebTransformationMatrix::setM21(double f)
-{
- m_private->setM21(f);
-}
-
double WebTransformationMatrix::m22() const
{
return m_private->m22();
}
-void WebTransformationMatrix::setM22(double f)
-{
- m_private->setM22(f);
-}
-
double WebTransformationMatrix::m23() const
{
return m_private->m23();
}
-void WebTransformationMatrix::setM23(double f)
-{
- m_private->setM23(f);
-}
-
double WebTransformationMatrix::m24() const
{
return m_private->m24();
}
-void WebTransformationMatrix::setM24(double f)
-{
- m_private->setM24(f);
-}
-
double WebTransformationMatrix::m31() const
{
return m_private->m31();
}
-void WebTransformationMatrix::setM31(double f)
-{
- m_private->setM31(f);
-}
-
double WebTransformationMatrix::m32() const
{
return m_private->m32();
}
-void WebTransformationMatrix::setM32(double f)
-{
- m_private->setM32(f);
-}
-
double WebTransformationMatrix::m33() const
{
return m_private->m33();
}
-void WebTransformationMatrix::setM33(double f)
-{
- m_private->setM33(f);
-}
-
double WebTransformationMatrix::m34() const
{
return m_private->m34();
}
-void WebTransformationMatrix::setM34(double f)
-{
- m_private->setM34(f);
-}
-
double WebTransformationMatrix::m41() const
{
return m_private->m41();
}
-void WebTransformationMatrix::setM41(double f)
-{
- m_private->setM41(f);
-}
-
double WebTransformationMatrix::m42() const
{
return m_private->m42();
}
-void WebTransformationMatrix::setM42(double f)
-{
- m_private->setM42(f);
-}
-
double WebTransformationMatrix::m43() const
{
return m_private->m43();
}
-void WebTransformationMatrix::setM43(double f)
-{
- m_private->setM43(f);
-}
-
double WebTransformationMatrix::m44() const
{
return m_private->m44();
}
-void WebTransformationMatrix::setM44(double f)
-{
- m_private->setM44(f);
-}
-
-double WebTransformationMatrix::a() const
-{
- return m_private->a();
-}
-
-void WebTransformationMatrix::setA(double a)
-{
- m_private->setA(a);
-}
-
-double WebTransformationMatrix::b() const
-{
- return m_private->b();
-}
-
-void WebTransformationMatrix::setB(double b)
-{
- m_private->setB(b);
-}
-
-double WebTransformationMatrix::c() const
-{
- return m_private->c();
-}
-
-void WebTransformationMatrix::setC(double c)
-{
- m_private->setC(c);
-}
-
-double WebTransformationMatrix::d() const
-{
- return m_private->d();
-}
-
-void WebTransformationMatrix::setD(double d)
-{
- m_private->setD(d);
-}
-
-double WebTransformationMatrix::e() const
-{
- return m_private->e();
-}
-
-void WebTransformationMatrix::setE(double e)
-{
- m_private->setE(e);
-}
-
-double WebTransformationMatrix::f() const
-{
- return m_private->f();
-}
-
-void WebTransformationMatrix::setF(double f)
-{
- m_private->setF(f);
-}
-
-TransformationMatrix WebTransformationMatrix::toWebCoreTransform() const
-{
- return *m_private.get();
-}
-
} // namespace WebKit
Modified: trunk/Source/WebCore/platform/graphics/chromium/AnimationTranslationUtil.cpp (145441 => 145442)
--- trunk/Source/WebCore/platform/graphics/chromium/AnimationTranslationUtil.cpp 2013-03-12 00:16:50 UTC (rev 145441)
+++ trunk/Source/WebCore/platform/graphics/chromium/AnimationTranslationUtil.cpp 2013-03-12 00:45:33 UTC (rev 145442)
@@ -36,8 +36,10 @@
#include "PerspectiveTransformOperation.h"
#include "RotateTransformOperation.h"
#include "ScaleTransformOperation.h"
+#include "SkMatrix44.h"
#include "SkewTransformOperation.h"
#include "TransformOperations.h"
+#include "TransformSkMatrix44Conversions.h"
#include "TranslateTransformOperation.h"
#include <public/Platform.h>
@@ -47,7 +49,6 @@
#include <public/WebFloatAnimationCurve.h>
#include <public/WebTransformAnimationCurve.h>
#include <public/WebTransformOperations.h>
-#include <public/WebTransformationMatrix.h>
#include <wtf/OwnPtr.h>
#include <wtf/text/CString.h>
@@ -102,13 +103,13 @@
case TransformOperation::MATRIX: {
MatrixTransformOperation* transform = static_cast<MatrixTransformOperation*>(transformOperations.operations()[j].get());
TransformationMatrix m = transform->matrix();
- webTransformOperations->appendMatrix(WebTransformationMatrix(m));
+ webTransformOperations->appendMatrix(TransformSkMatrix44Conversions::convert(m));
break;
}
case TransformOperation::MATRIX_3D: {
Matrix3DTransformOperation* transform = static_cast<Matrix3DTransformOperation*>(transformOperations.operations()[j].get());
TransformationMatrix m = transform->matrix();
- webTransformOperations->appendMatrix(WebTransformationMatrix(m));
+ webTransformOperations->appendMatrix(TransformSkMatrix44Conversions::convert(m));
break;
}
case TransformOperation::PERSPECTIVE: {
Modified: trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp (145441 => 145442)
--- trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp 2013-03-12 00:16:50 UTC (rev 145441)
+++ trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp 2013-03-12 00:45:33 UTC (rev 145442)
@@ -59,6 +59,7 @@
#include "SkMatrix44.h"
#include "SkiaImageFilterBuilder.h"
#include "SystemTime.h"
+#include "TransformSkMatrix44Conversions.h"
#include <public/Platform.h>
#include <public/WebAnimation.h>
#include <public/WebCompositorSupport.h>
@@ -701,36 +702,14 @@
platformLayer()->setAnchorPointZ(m_anchorPoint.z());
}
-static SkMatrix44 transformToSkMatrix44(const TransformationMatrix& matrix)
-{
- SkMatrix44 ret(SkMatrix44::kUninitialized_Constructor);
- ret.setDouble(0, 0, matrix.m11());
- ret.setDouble(0, 1, matrix.m21());
- ret.setDouble(0, 2, matrix.m31());
- ret.setDouble(0, 3, matrix.m41());
- ret.setDouble(1, 0, matrix.m12());
- ret.setDouble(1, 1, matrix.m22());
- ret.setDouble(1, 2, matrix.m32());
- ret.setDouble(1, 3, matrix.m42());
- ret.setDouble(2, 0, matrix.m13());
- ret.setDouble(2, 1, matrix.m23());
- ret.setDouble(2, 2, matrix.m33());
- ret.setDouble(2, 3, matrix.m43());
- ret.setDouble(3, 0, matrix.m14());
- ret.setDouble(3, 1, matrix.m24());
- ret.setDouble(3, 2, matrix.m34());
- ret.setDouble(3, 3, matrix.m44());
- return ret;
-}
-
void GraphicsLayerChromium::updateTransform()
{
- platformLayer()->setTransform(transformToSkMatrix44(m_transform));
+ platformLayer()->setTransform(TransformSkMatrix44Conversions::convert(m_transform));
}
void GraphicsLayerChromium::updateChildrenTransform()
{
- platformLayer()->setSublayerTransform(transformToSkMatrix44(m_childrenTransform));
+ platformLayer()->setSublayerTransform(TransformSkMatrix44Conversions::convert(m_childrenTransform));
}
void GraphicsLayerChromium::updateMasksToBounds()
Copied: trunk/Source/WebCore/platform/graphics/chromium/TransformSkMatrix44Conversions.cpp (from rev 145441, trunk/Source/Platform/chromium/public/WebTransformAnimationCurve.h) (0 => 145442)
--- trunk/Source/WebCore/platform/graphics/chromium/TransformSkMatrix44Conversions.cpp (rev 0)
+++ trunk/Source/WebCore/platform/graphics/chromium/TransformSkMatrix44Conversions.cpp 2013-03-12 00:45:33 UTC (rev 145442)
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "TransformSkMatrix44Conversions.h"
+
+#include "TransformationMatrix.h"
+
+namespace WebCore {
+
+SkMatrix44 TransformSkMatrix44Conversions::convert(const TransformationMatrix& matrix)
+{
+ SkMatrix44 ret(SkMatrix44::kUninitialized_Constructor);
+ ret.setDouble(0, 0, matrix.m11());
+ ret.setDouble(0, 1, matrix.m21());
+ ret.setDouble(0, 2, matrix.m31());
+ ret.setDouble(0, 3, matrix.m41());
+ ret.setDouble(1, 0, matrix.m12());
+ ret.setDouble(1, 1, matrix.m22());
+ ret.setDouble(1, 2, matrix.m32());
+ ret.setDouble(1, 3, matrix.m42());
+ ret.setDouble(2, 0, matrix.m13());
+ ret.setDouble(2, 1, matrix.m23());
+ ret.setDouble(2, 2, matrix.m33());
+ ret.setDouble(2, 3, matrix.m43());
+ ret.setDouble(3, 0, matrix.m14());
+ ret.setDouble(3, 1, matrix.m24());
+ ret.setDouble(3, 2, matrix.m34());
+ ret.setDouble(3, 3, matrix.m44());
+ return ret;
+}
+
+} // namespace WebCore
Copied: trunk/Source/WebCore/platform/graphics/chromium/TransformSkMatrix44Conversions.h (from rev 145441, trunk/Source/Platform/chromium/public/WebTransformAnimationCurve.h) (0 => 145442)
--- trunk/Source/WebCore/platform/graphics/chromium/TransformSkMatrix44Conversions.h (rev 0)
+++ trunk/Source/WebCore/platform/graphics/chromium/TransformSkMatrix44Conversions.h 2013-03-12 00:45:33 UTC (rev 145442)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "SkMatrix44.h"
+
+namespace WebCore {
+
+class TransformationMatrix;
+
+class TransformSkMatrix44Conversions {
+public:
+ static SkMatrix44 convert(const TransformationMatrix&);
+};
+
+} // namespace WebCore