| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef SkMatrix_DEFINED | 10 #ifndef SkMatrix_DEFINED |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 * only difference between the two matrices. It considers NaN values to be | 532 * only difference between the two matrices. It considers NaN values to be |
| 533 * equal to themselves. So a matrix full of NaNs is "cheap equal" to | 533 * equal to themselves. So a matrix full of NaNs is "cheap equal" to |
| 534 * another matrix full of NaNs iff the NaN values are bitwise identical | 534 * another matrix full of NaNs iff the NaN values are bitwise identical |
| 535 * while according to strict the strict == test a matrix with a NaN value | 535 * while according to strict the strict == test a matrix with a NaN value |
| 536 * is equal to nothing, including itself. | 536 * is equal to nothing, including itself. |
| 537 */ | 537 */ |
| 538 bool cheapEqualTo(const SkMatrix& m) const { | 538 bool cheapEqualTo(const SkMatrix& m) const { |
| 539 return 0 == memcmp(fMat, m.fMat, sizeof(fMat)); | 539 return 0 == memcmp(fMat, m.fMat, sizeof(fMat)); |
| 540 } | 540 } |
| 541 | 541 |
| 542 friend bool operator==(const SkMatrix& a, const SkMatrix& b); | 542 friend SK_API bool operator==(const SkMatrix& a, const SkMatrix& b); |
| 543 friend bool operator!=(const SkMatrix& a, const SkMatrix& b) { | 543 friend SK_API bool operator!=(const SkMatrix& a, const SkMatrix& b) { |
| 544 return !(a == b); | 544 return !(a == b); |
| 545 } | 545 } |
| 546 | 546 |
| 547 enum { | 547 enum { |
| 548 // writeTo/readFromMemory will never return a value larger than this | 548 // writeTo/readFromMemory will never return a value larger than this |
| 549 kMaxFlattenSize = 9 * sizeof(SkScalar) + sizeof(uint32_t) | 549 kMaxFlattenSize = 9 * sizeof(SkScalar) + sizeof(uint32_t) |
| 550 }; | 550 }; |
| 551 // return the number of bytes written, whether or not buffer is null | 551 // return the number of bytes written, whether or not buffer is null |
| 552 size_t writeToMemory(void* buffer) const; | 552 size_t writeToMemory(void* buffer) const; |
| 553 /** | 553 /** |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 static void RotTrans_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], | 734 static void RotTrans_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], |
| 735 int count); | 735 int count); |
| 736 static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int); | 736 static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int); |
| 737 | 737 |
| 738 static const MapPtsProc gMapPtsProcs[]; | 738 static const MapPtsProc gMapPtsProcs[]; |
| 739 | 739 |
| 740 friend class SkPerspIter; | 740 friend class SkPerspIter; |
| 741 }; | 741 }; |
| 742 | 742 |
| 743 #endif | 743 #endif |
| OLD | NEW |