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

Side by Side Diff: include/core/SkMatrix.h

Issue 678153002: Add SK_API to global scope operators of SkMatrix (Closed) Base URL: https://chromium.googlesource.com/skia.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 | « no previous file | no next file » | 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 /* 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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698