OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_GFX_SKIA_COLOR_SPACE_UTIL_H_ | 5 #ifndef UI_GFX_SKIA_COLOR_SPACE_UTIL_H_ |
6 #define UI_GFX_SKIA_COLOR_SPACE_UTIL_H_ | 6 #define UI_GFX_SKIA_COLOR_SPACE_UTIL_H_ |
7 | 7 |
8 #include "third_party/skia/include/core/SkColorSpace.h" | 8 #include "third_party/skia/include/core/SkColorSpace.h" |
| 9 #include "third_party/skia/include/core/SkICC.h" |
9 #include "ui/gfx/gfx_export.h" | 10 #include "ui/gfx/gfx_export.h" |
10 | 11 |
11 namespace gfx { | 12 namespace gfx { |
12 | 13 |
13 float GFX_EXPORT SkTransferFnEval(const SkColorSpaceTransferFn& fn, float x); | 14 float GFX_EXPORT SkTransferFnEval(const SkColorSpaceTransferFn& fn, float x); |
14 | 15 |
15 SkColorSpaceTransferFn GFX_EXPORT | 16 SkColorSpaceTransferFn GFX_EXPORT |
16 SkTransferFnInverse(const SkColorSpaceTransferFn& fn); | 17 SkTransferFnInverse(const SkColorSpaceTransferFn& fn); |
17 | 18 |
18 bool GFX_EXPORT | 19 bool GFX_EXPORT |
19 SkTransferFnsApproximatelyCancel(const SkColorSpaceTransferFn& a, | 20 SkTransferFnsApproximatelyCancel(const SkColorSpaceTransferFn& a, |
20 const SkColorSpaceTransferFn& b); | 21 const SkColorSpaceTransferFn& b); |
21 | 22 |
22 bool GFX_EXPORT | 23 bool GFX_EXPORT |
23 SkTransferFnIsApproximatelyIdentity(const SkColorSpaceTransferFn& fn); | 24 SkTransferFnIsApproximatelyIdentity(const SkColorSpaceTransferFn& fn); |
24 | 25 |
| 26 void GFX_EXPORT SkApproximateTransferFn(const float* x, |
| 27 const float* t, |
| 28 size_t n, |
| 29 SkColorSpaceTransferFn* fn, |
| 30 float* error, |
| 31 bool* nonlinear_fit_converged); |
| 32 |
25 bool GFX_EXPORT SkMatrixIsApproximatelyIdentity(const SkMatrix44& m); | 33 bool GFX_EXPORT SkMatrixIsApproximatelyIdentity(const SkMatrix44& m); |
26 | 34 |
27 } // namespace gfx | 35 } // namespace gfx |
28 | 36 |
29 #endif // UI_GFX_SKIA_COLOR_SPACE_UTIL_H_ | 37 #endif // UI_GFX_SKIA_COLOR_SPACE_UTIL_H_ |
OLD | NEW |