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

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

Issue 722723003: Re-land 714393002 after fixing android build. (Closed) Base URL: git@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
« no previous file with comments | « sky/engine/platform/graphics/Image.h ('k') | sky/engine/platform/weborigin/KURL.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
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
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
OLDNEW
« no previous file with comments | « sky/engine/platform/graphics/Image.h ('k') | sky/engine/platform/weborigin/KURL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698