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 #include "SkColorPriv.h" | 8 #include "SkColorPriv.h" |
9 #include "SkColorSpace_Base.h" | 9 #include "SkColorSpace_Base.h" |
10 #include "SkColorSpacePriv.h" | 10 #include "SkColorSpacePriv.h" |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 } else if (gammas->isValue(i)) { | 296 } else if (gammas->isValue(i)) { |
297 (*fns.fBuildFromValue)(&gammaTableStorage[i * gammaTableSize
], | 297 (*fns.fBuildFromValue)(&gammaTableStorage[i * gammaTableSize
], |
298 gammas->data(i).fValue); | 298 gammas->data(i).fValue); |
299 outGammaTables[i] = &gammaTableStorage[i * gammaTableSize]; | 299 outGammaTables[i] = &gammaTableStorage[i * gammaTableSize]; |
300 } else if (gammas->isTable(i)) { | 300 } else if (gammas->isTable(i)) { |
301 (*fns.fBuildFromTable)(&gammaTableStorage[i * gammaTableSize
], gammas->table(i), | 301 (*fns.fBuildFromTable)(&gammaTableStorage[i * gammaTableSize
], gammas->table(i), |
302 gammas->data(i).fTable.fSize); | 302 gammas->data(i).fTable.fSize); |
303 outGammaTables[i] = &gammaTableStorage[i * gammaTableSize]; | 303 outGammaTables[i] = &gammaTableStorage[i * gammaTableSize]; |
304 } else { | 304 } else { |
305 SkASSERT(gammas->isParametric(i)); | 305 SkASSERT(gammas->isParametric(i)); |
306 const SkGammas::Params& params = gammas->params(i); | 306 const SkColorSpaceTransferFn& params = gammas->params(i); |
307 (*fns.fBuildFromParam)(&gammaTableStorage[i * gammaTableSize
], params.fG, | 307 (*fns.fBuildFromParam)(&gammaTableStorage[i * gammaTableSize
], params.fG, |
308 params.fA, params.fB, params.fC, para
ms.fD, params.fE, | 308 params.fA, params.fB, params.fC, para
ms.fD, params.fE, |
309 params.fF); | 309 params.fF); |
310 outGammaTables[i] = &gammaTableStorage[i * gammaTableSize]; | 310 outGammaTables[i] = &gammaTableStorage[i * gammaTableSize]; |
311 } | 311 } |
312 }; | 312 }; |
313 | 313 |
314 if (gammasAreMatching) { | 314 if (gammasAreMatching) { |
315 build_table(0); | 315 build_table(0); |
316 outGammaTables[1] = outGammaTables[0]; | 316 outGammaTables[1] = outGammaTables[0]; |
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1432 } | 1432 } |
1433 } | 1433 } |
1434 | 1434 |
1435 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 1435 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
1436 | 1436 |
1437 std::unique_ptr<SkColorSpaceXform> SlowIdentityXform(SkColorSpace* space) { | 1437 std::unique_ptr<SkColorSpaceXform> SlowIdentityXform(SkColorSpace* space) { |
1438 return std::unique_ptr<SkColorSpaceXform>(new SkColorSpaceXform_Base | 1438 return std::unique_ptr<SkColorSpaceXform>(new SkColorSpaceXform_Base |
1439 <kTable_SrcGamma, kTable_DstGamma, kNone_ColorSpaceMatch> | 1439 <kTable_SrcGamma, kTable_DstGamma, kNone_ColorSpaceMatch> |
1440 (space, SkMatrix::I(), space)); | 1440 (space, SkMatrix::I(), space)); |
1441 } | 1441 } |
OLD | NEW |