| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 class FloatBox; | 44 class FloatBox; |
| 45 #if CPU(X86_64) | 45 #if CPU(X86_64) |
| 46 #define TRANSFORMATION_MATRIX_USE_X86_64_SSE2 | 46 #define TRANSFORMATION_MATRIX_USE_X86_64_SSE2 |
| 47 #endif | 47 #endif |
| 48 | 48 |
| 49 class PLATFORM_EXPORT TransformationMatrix { | 49 class PLATFORM_EXPORT TransformationMatrix { |
| 50 WTF_MAKE_FAST_ALLOCATED; | 50 WTF_MAKE_FAST_ALLOCATED; |
| 51 public: | 51 public: |
| 52 | 52 |
| 53 #if CPU(APPLE_ARMV7S) || defined(TRANSFORMATION_MATRIX_USE_X86_64_SSE2) | 53 #if CPU(APPLE_ARMV7S) || defined(TRANSFORMATION_MATRIX_USE_X86_64_SSE2) |
| 54 #if COMPILER(MSVC) | |
| 55 __declspec(align(16)) typedef double Matrix4[4][4]; | |
| 56 #else | |
| 57 typedef double Matrix4[4][4] __attribute__((aligned (16))); | 54 typedef double Matrix4[4][4] __attribute__((aligned (16))); |
| 58 #endif | |
| 59 #else | 55 #else |
| 60 typedef double Matrix4[4][4]; | 56 typedef double Matrix4[4][4]; |
| 61 #endif | 57 #endif |
| 62 | 58 |
| 63 TransformationMatrix() { makeIdentity(); } | 59 TransformationMatrix() { makeIdentity(); } |
| 64 TransformationMatrix(const AffineTransform& t); | 60 TransformationMatrix(const AffineTransform& t); |
| 65 TransformationMatrix(const TransformationMatrix& t) { *this = t; } | 61 TransformationMatrix(const TransformationMatrix& t) { *this = t; } |
| 66 TransformationMatrix(double a, double b, double c, double d, double e, doubl
e f) { setMatrix(a, b, c, d, e, f); } | 62 TransformationMatrix(double a, double b, double c, double d, double e, doubl
e f) { setMatrix(a, b, c, d, e, f); } |
| 67 TransformationMatrix(double m11, double m12, double m13, double m14, | 63 TransformationMatrix(double m11, double m12, double m13, double m14, |
| 68 double m21, double m22, double m23, double m24, | 64 double m21, double m22, double m23, double m24, |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 if (m && m != m_matrix) | 347 if (m && m != m_matrix) |
| 352 memcpy(m_matrix, m, sizeof(Matrix4)); | 348 memcpy(m_matrix, m, sizeof(Matrix4)); |
| 353 } | 349 } |
| 354 | 350 |
| 355 Matrix4 m_matrix; | 351 Matrix4 m_matrix; |
| 356 }; | 352 }; |
| 357 | 353 |
| 358 } // namespace blink | 354 } // namespace blink |
| 359 | 355 |
| 360 #endif // TransformationMatrix_h | 356 #endif // TransformationMatrix_h |
| OLD | NEW |