| Index: third_party/WebKit/Source/platform/testing/TransformPrinters.cpp
|
| diff --git a/third_party/WebKit/Source/platform/testing/TransformPrinters.cpp b/third_party/WebKit/Source/platform/testing/TransformPrinters.cpp
|
| index 1707336a4c6b4b5f926786b2dd17045eebe87a88..ba03cc72f72dc3c7a10a986c44f112c28b650b36 100644
|
| --- a/third_party/WebKit/Source/platform/testing/TransformPrinters.cpp
|
| +++ b/third_party/WebKit/Source/platform/testing/TransformPrinters.cpp
|
| @@ -6,52 +6,19 @@
|
|
|
| #include "platform/transforms/AffineTransform.h"
|
| #include "platform/transforms/TransformationMatrix.h"
|
| +#include "wtf/text/WTFString.h"
|
| #include <ostream> // NOLINT
|
|
|
| namespace blink {
|
|
|
| void PrintTo(const AffineTransform& transform, std::ostream* os)
|
| {
|
| - AffineTransform::DecomposedType decomposition;
|
| - if (!transform.decompose(decomposition)) {
|
| - *os << "AffineTransform(degenerate)";
|
| - return;
|
| - }
|
| -
|
| - if (transform.isIdentityOrTranslation()) {
|
| - *os << "AffineTransform(translation=(" << decomposition.translateX << "," << decomposition.translateY << "))";
|
| - return;
|
| - }
|
| -
|
| - *os << "AffineTransform("
|
| - << "translation=(" << decomposition.translateX << "," << decomposition.translateY << ")"
|
| - << ", scale=(" << decomposition.scaleX << "," << decomposition.scaleY << ")"
|
| - << ", angle=(" << decomposition.angle << ")"
|
| - << ", remainder=(" << decomposition.remainderA << "," << decomposition.remainderB << "," << decomposition.remainderC << "," << decomposition.remainderD << ")"
|
| - << ", translate=(" << decomposition.translateX << "," << decomposition.translateY << ")"
|
| - << ")";
|
| + *os << transform.toString();
|
| }
|
|
|
| void PrintTo(const TransformationMatrix& matrix, std::ostream* os)
|
| {
|
| - TransformationMatrix::DecomposedType decomposition;
|
| - if (!matrix.decompose(decomposition)) {
|
| - *os << "TransformationMatrix(degenerate)";
|
| - return;
|
| - }
|
| -
|
| - if (matrix.isIdentityOrTranslation()) {
|
| - *os << "TransformationMatrix(translation=(" << decomposition.translateX << "," << decomposition.translateY << "," << decomposition.translateZ << "))";
|
| - return;
|
| - }
|
| -
|
| - *os << "TransformationMatrix("
|
| - << "translation=(" << decomposition.translateX << "," << decomposition.translateY << "," << decomposition.translateZ << ")"
|
| - << ", scale=(" << decomposition.scaleX << "," << decomposition.scaleY << "," << decomposition.scaleZ << ")"
|
| - << ", skew=(" << decomposition.skewXY << "," << decomposition.skewXZ << "," << decomposition.skewYZ << ")"
|
| - << ", quaternion=(" << decomposition.quaternionX << "," << decomposition.quaternionY << "," << decomposition.quaternionZ << "," << decomposition.quaternionW << ")"
|
| - << ", perspective=(" << decomposition.perspectiveX << "," << decomposition.perspectiveY << "," << decomposition.perspectiveZ << "," << decomposition.perspectiveW << ")"
|
| - << ")";
|
| + *os << matrix.toString();
|
| }
|
|
|
| } // namespace blink
|
|
|