Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: sky/engine/platform/transforms/TransformationMatrix.h

Issue 719063002: Revert "Remove support for MSVC" (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
54 typedef double Matrix4[4][4] __attribute__((aligned (16))); 57 typedef double Matrix4[4][4] __attribute__((aligned (16)));
58 #endif
55 #else 59 #else
56 typedef double Matrix4[4][4]; 60 typedef double Matrix4[4][4];
57 #endif 61 #endif
58 62
59 TransformationMatrix() { makeIdentity(); } 63 TransformationMatrix() { makeIdentity(); }
60 TransformationMatrix(const AffineTransform& t); 64 TransformationMatrix(const AffineTransform& t);
61 TransformationMatrix(const TransformationMatrix& t) { *this = t; } 65 TransformationMatrix(const TransformationMatrix& t) { *this = t; }
62 TransformationMatrix(double a, double b, double c, double d, double e, doubl e f) { setMatrix(a, b, c, d, e, f); } 66 TransformationMatrix(double a, double b, double c, double d, double e, doubl e f) { setMatrix(a, b, c, d, e, f); }
63 TransformationMatrix(double m11, double m12, double m13, double m14, 67 TransformationMatrix(double m11, double m12, double m13, double m14,
64 double m21, double m22, double m23, double m24, 68 double m21, double m22, double m23, double m24,
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 if (m && m != m_matrix) 351 if (m && m != m_matrix)
348 memcpy(m_matrix, m, sizeof(Matrix4)); 352 memcpy(m_matrix, m, sizeof(Matrix4));
349 } 353 }
350 354
351 Matrix4 m_matrix; 355 Matrix4 m_matrix;
352 }; 356 };
353 357
354 } // namespace blink 358 } // namespace blink
355 359
356 #endif // TransformationMatrix_h 360 #endif // TransformationMatrix_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698