| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkMatrix44_DEFINED | 8 #ifndef SkMatrix44_DEFINED |
| 9 #define SkMatrix44_DEFINED | 9 #define SkMatrix44_DEFINED |
| 10 | 10 |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 /* This is indexed by [col][row]. */ | 450 /* This is indexed by [col][row]. */ |
| 451 SkMScalar fMat[4][4]; | 451 SkMScalar fMat[4][4]; |
| 452 mutable unsigned fTypeMask; | 452 mutable unsigned fTypeMask; |
| 453 | 453 |
| 454 enum { | 454 enum { |
| 455 kUnknown_Mask = 0x80, | 455 kUnknown_Mask = 0x80, |
| 456 | 456 |
| 457 kAllPublic_Masks = 0xF | 457 kAllPublic_Masks = 0xF |
| 458 }; | 458 }; |
| 459 | 459 |
| 460 void as4x3ColMajorf(float[]) const; | 460 void as3x4RowMajorf(float[]) const; |
| 461 void set4x3ColMajorf(const float[]); | 461 void set3x4RowMajorf(const float[]); |
| 462 | 462 |
| 463 SkMScalar transX() const { return fMat[3][0]; } | 463 SkMScalar transX() const { return fMat[3][0]; } |
| 464 SkMScalar transY() const { return fMat[3][1]; } | 464 SkMScalar transY() const { return fMat[3][1]; } |
| 465 SkMScalar transZ() const { return fMat[3][2]; } | 465 SkMScalar transZ() const { return fMat[3][2]; } |
| 466 | 466 |
| 467 SkMScalar scaleX() const { return fMat[0][0]; } | 467 SkMScalar scaleX() const { return fMat[0][0]; } |
| 468 SkMScalar scaleY() const { return fMat[1][1]; } | 468 SkMScalar scaleY() const { return fMat[1][1]; } |
| 469 SkMScalar scaleZ() const { return fMat[2][2]; } | 469 SkMScalar scaleZ() const { return fMat[2][2]; } |
| 470 | 470 |
| 471 SkMScalar perspX() const { return fMat[0][3]; } | 471 SkMScalar perspX() const { return fMat[0][3]; } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 488 * we already know that this matrix is identity. | 488 * we already know that this matrix is identity. |
| 489 */ | 489 */ |
| 490 inline bool isTriviallyIdentity() const { | 490 inline bool isTriviallyIdentity() const { |
| 491 return 0 == fTypeMask; | 491 return 0 == fTypeMask; |
| 492 } | 492 } |
| 493 | 493 |
| 494 friend class SkColorSpace; | 494 friend class SkColorSpace; |
| 495 }; | 495 }; |
| 496 | 496 |
| 497 #endif | 497 #endif |
| OLD | NEW |