OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 SkColorSpaceXform_DEFINED | 8 #ifndef SkColorSpaceXform_DEFINED |
9 #define SkColorSpaceXform_DEFINED | 9 #define SkColorSpaceXform_DEFINED |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 private: | 48 private: |
49 SkFastXform(const sk_sp<SkColorSpace>& srcSpace, const SkMatrix44& srcToDst, | 49 SkFastXform(const sk_sp<SkColorSpace>& srcSpace, const SkMatrix44& srcToDst, |
50 const sk_sp<SkColorSpace>& dstSpace); | 50 const sk_sp<SkColorSpace>& dstSpace); |
51 | 51 |
52 static constexpr int kDstGammaTableSize = 1024; | 52 static constexpr int kDstGammaTableSize = 1024; |
53 | 53 |
54 // May contain pointers into storage or pointers into precomputed tables. | 54 // May contain pointers into storage or pointers into precomputed tables. |
55 const float* fSrcGammaTables[3]; | 55 const float* fSrcGammaTables[3]; |
56 float fSrcGammaTableStorage[3 * 256]; | 56 float fSrcGammaTableStorage[3 * 256]; |
57 | 57 |
58 float fSrcToDst[12]; | 58 float fSrcToDst[16]; |
59 | 59 |
60 // May contain pointers into storage or pointers into precomputed tables. | 60 // May contain pointers into storage or pointers into precomputed tables. |
61 const uint8_t* fDstGammaTables[3]; | 61 const uint8_t* fDstGammaTables[3]; |
62 uint8_t fDstGammaTableStorage[3 * kDstGammaTableSize]; | 62 uint8_t fDstGammaTableStorage[3 * kDstGammaTableSize]; |
63 | 63 |
64 friend class SkColorSpaceXform; | 64 friend class SkColorSpaceXform; |
65 }; | 65 }; |
66 | 66 |
67 /** | 67 /** |
68 * Works for any valid src and dst profiles. | 68 * Works for any valid src and dst profiles. |
(...skipping 21 matching lines...) Expand all Loading... |
90 const SkMatrix44 fSrcToDst; | 90 const SkMatrix44 fSrcToDst; |
91 | 91 |
92 // May contain pointers into storage or pointers into precomputed tables. | 92 // May contain pointers into storage or pointers into precomputed tables. |
93 const uint8_t* fDstGammaTables[3]; | 93 const uint8_t* fDstGammaTables[3]; |
94 uint8_t fDstGammaTableStorage[3 * kDstGammaTableSize]; | 94 uint8_t fDstGammaTableStorage[3 * kDstGammaTableSize]; |
95 | 95 |
96 friend class SkColorSpaceXform; | 96 friend class SkColorSpaceXform; |
97 }; | 97 }; |
98 | 98 |
99 #endif | 99 #endif |
OLD | NEW |