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

Side by Side Diff: third_party/WebKit/Source/platform/transforms/TransformationMatrix.h

Issue 1666613002: Remove APPLE_ARMV7S-specific code from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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 | « no previous file | third_party/WebKit/Source/platform/transforms/TransformationMatrix.cpp » ('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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #define TRANSFORMATION_MATRIX_USE_X86_64_SSE2 47 #define TRANSFORMATION_MATRIX_USE_X86_64_SSE2
48 #endif 48 #endif
49 49
50 // TransformationMatrix must not be allocated on Oilpan's heap since 50 // TransformationMatrix must not be allocated on Oilpan's heap since
51 // Oilpan doesn't (yet) have an ability to allocate the TransformationMatrix 51 // Oilpan doesn't (yet) have an ability to allocate the TransformationMatrix
52 // with 16-byte alignment. PartitionAlloc has the ability. 52 // with 16-byte alignment. PartitionAlloc has the ability.
53 class PLATFORM_EXPORT TransformationMatrix { 53 class PLATFORM_EXPORT TransformationMatrix {
54 USING_FAST_MALLOC(TransformationMatrix); 54 USING_FAST_MALLOC(TransformationMatrix);
55 public: 55 public:
56 56
57 #if CPU(APPLE_ARMV7S) || defined(TRANSFORMATION_MATRIX_USE_X86_64_SSE2) 57 #if defined(TRANSFORMATION_MATRIX_USE_X86_64_SSE2)
58 typedef WTF_ALIGNED(double, Matrix4[4][4], 16); 58 typedef WTF_ALIGNED(double, Matrix4[4][4], 16);
59 #else 59 #else
60 typedef double Matrix4[4][4]; 60 typedef double Matrix4[4][4];
61 #endif 61 #endif
62 62
63 TransformationMatrix() 63 TransformationMatrix()
64 { 64 {
65 checkAlignment(); 65 checkAlignment();
66 makeIdentity(); 66 makeIdentity();
67 } 67 }
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } 381 }
382 382
383 void setMatrix(const Matrix4 m) 383 void setMatrix(const Matrix4 m)
384 { 384 {
385 if (m && m != m_matrix) 385 if (m && m != m_matrix)
386 memcpy(m_matrix, m, sizeof(Matrix4)); 386 memcpy(m_matrix, m, sizeof(Matrix4));
387 } 387 }
388 388
389 void checkAlignment() 389 void checkAlignment()
390 { 390 {
391 #if CPU(APPLE_ARMV7S) || defined(TRANSFORMATION_MATRIX_USE_X86_64_SSE2) 391 #if defined(TRANSFORMATION_MATRIX_USE_X86_64_SSE2)
392 // m_matrix can cause this class to require higher than usual alignment. 392 // m_matrix can cause this class to require higher than usual alignment.
393 // Make sure the allocator handles this. 393 // Make sure the allocator handles this.
394 ASSERT((reinterpret_cast<uintptr_t>(this) & (WTF_ALIGN_OF(Transformation Matrix) - 1)) == 0); 394 ASSERT((reinterpret_cast<uintptr_t>(this) & (WTF_ALIGN_OF(Transformation Matrix) - 1)) == 0);
395 #endif 395 #endif
396 } 396 }
397 397
398 Matrix4 m_matrix; 398 Matrix4 m_matrix;
399 }; 399 };
400 400
401 // Redeclared here to avoid ODR issues. 401 // Redeclared here to avoid ODR issues.
402 // See platform/testing/TransformPrinters.h. 402 // See platform/testing/TransformPrinters.h.
403 void PrintTo(const TransformationMatrix&, std::ostream*); 403 void PrintTo(const TransformationMatrix&, std::ostream*);
404 404
405 } // namespace blink 405 } // namespace blink
406 406
407 #endif // TransformationMatrix_h 407 #endif // TransformationMatrix_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/transforms/TransformationMatrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698