Chromium Code Reviews| 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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 551 friend bool operator==(const SkMatrix& a, const SkMatrix& b); | 551 friend bool operator==(const SkMatrix& a, const SkMatrix& b); |
| 552 #endif | 552 #endif |
| 553 friend bool operator!=(const SkMatrix& a, const SkMatrix& b) { | 553 friend bool operator!=(const SkMatrix& a, const SkMatrix& b) { |
| 554 return !(a == b); | 554 return !(a == b); |
| 555 } | 555 } |
| 556 | 556 |
| 557 enum { | 557 enum { |
| 558 // writeTo/readFromMemory will never return a value larger than this | 558 // writeTo/readFromMemory will never return a value larger than this |
| 559 kMaxFlattenSize = 9 * sizeof(SkScalar) + sizeof(uint32_t) | 559 kMaxFlattenSize = 9 * sizeof(SkScalar) + sizeof(uint32_t) |
| 560 }; | 560 }; |
| 561 // return the number of bytes of the current object's flattened representati on | |
| 562 uint32_t sizeInMemory() const; | |
|
reed1
2013/10/24 20:51:19
Doesn't writeToMemory(NULL) return this same value
| |
| 563 // return the number of bytes to read | |
| 564 static uint32_t SizeToRead(); | |
|
reed1
2013/10/24 20:51:19
This need not always be the same value for all mat
| |
| 561 // return the number of bytes written, whether or not buffer is null | 565 // return the number of bytes written, whether or not buffer is null |
| 562 uint32_t writeToMemory(void* buffer) const; | 566 uint32_t writeToMemory(void* buffer) const; |
| 563 // return the number of bytes read | 567 // return the number of bytes read |
| 564 uint32_t readFromMemory(const void* buffer); | 568 uint32_t readFromMemory(const void* buffer); |
| 565 | 569 |
| 566 SkDEVCODE(void dump() const;) | 570 SkDEVCODE(void dump() const;) |
| 567 SkDEVCODE(void toString(SkString*) const;) | 571 SkDEVCODE(void toString(SkString*) const;) |
| 568 | 572 |
| 569 /** | 573 /** |
| 570 * Calculates the maximum stretching factor of the matrix. If the matrix has | 574 * Calculates the maximum stretching factor of the matrix. If the matrix has |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 690 static void RotTrans_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], | 694 static void RotTrans_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], |
| 691 int count); | 695 int count); |
| 692 static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int); | 696 static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int); |
| 693 | 697 |
| 694 static const MapPtsProc gMapPtsProcs[]; | 698 static const MapPtsProc gMapPtsProcs[]; |
| 695 | 699 |
| 696 friend class SkPerspIter; | 700 friend class SkPerspIter; |
| 697 }; | 701 }; |
| 698 | 702 |
| 699 #endif | 703 #endif |
| OLD | NEW |