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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 | 497 |
498 void SetMatrix(const Matrix4 m) { | 498 void SetMatrix(const Matrix4 m) { |
499 if (m && m != matrix_) | 499 if (m && m != matrix_) |
500 memcpy(matrix_, m, sizeof(Matrix4)); | 500 memcpy(matrix_, m, sizeof(Matrix4)); |
501 } | 501 } |
502 | 502 |
503 void CheckAlignment() { | 503 void CheckAlignment() { |
504 #if defined(TRANSFORMATION_MATRIX_USE_X86_64_SSE2) | 504 #if defined(TRANSFORMATION_MATRIX_USE_X86_64_SSE2) |
505 // m_matrix can cause this class to require higher than usual alignment. | 505 // m_matrix can cause this class to require higher than usual alignment. |
506 // Make sure the allocator handles this. | 506 // Make sure the allocator handles this. |
507 DCHECK((reinterpret_cast<uintptr_t>(this) & | 507 DCHECK_EQ((reinterpret_cast<uintptr_t>(this) & |
508 (WTF_ALIGN_OF(TransformationMatrix) - 1)) == 0); | 508 (WTF_ALIGN_OF(TransformationMatrix) - 1)), |
| 509 0UL); |
509 #endif | 510 #endif |
510 } | 511 } |
511 | 512 |
512 Matrix4 matrix_; | 513 Matrix4 matrix_; |
513 }; | 514 }; |
514 | 515 |
515 // Redeclared here to avoid ODR issues. | 516 // Redeclared here to avoid ODR issues. |
516 // See platform/testing/TransformPrinters.h. | 517 // See platform/testing/TransformPrinters.h. |
517 void PrintTo(const TransformationMatrix&, std::ostream*); | 518 void PrintTo(const TransformationMatrix&, std::ostream*); |
518 | 519 |
519 } // namespace blink | 520 } // namespace blink |
520 | 521 |
521 #endif // TransformationMatrix_h | 522 #endif // TransformationMatrix_h |
OLD | NEW |