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

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

Issue 2324843003: Fix storage of gamut transform matrices in SkColorSpace (Closed)
Patch Set: Created 4 years, 3 months 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « gm/gamut.cpp ('k') | src/codec/SkPngCodec.cpp » ('j') | src/core/SkColorSpaceXform.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698