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

Unified Diff: ui/gfx/skia_color_space_util.h

Issue 2742613002: color: Always use parametric color spaces for raster (Closed)
Patch Set: Incorporate review feedback Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/icc_profile_unittest.cc ('k') | ui/gfx/skia_color_space_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/skia_color_space_util.h
diff --git a/ui/gfx/skia_color_space_util.h b/ui/gfx/skia_color_space_util.h
index f22b040e8848708656b917ff48ec511e61c8dc79..5ece50eca06d0dca08dbbb777b76959a8c29b625 100644
--- a/ui/gfx/skia_color_space_util.h
+++ b/ui/gfx/skia_color_space_util.h
@@ -6,6 +6,7 @@
#define UI_GFX_SKIA_COLOR_SPACE_UTIL_H_
#include "third_party/skia/include/core/SkColorSpace.h"
+#include "third_party/skia/include/core/SkICC.h"
#include "ui/gfx/gfx_export.h"
namespace gfx {
@@ -29,6 +30,14 @@ bool GFX_EXPORT SkApproximateTransferFn(const float* x,
size_t n,
SkColorSpaceTransferFn* fn);
+// Approximates |sk_icc| by the transfer function |fn|. Returns in |max_error|
+// the maximum pointwise of all color channels' transfer functions with |fn|.
+// Returns false if no approximation was possible, or no approximation
+// converged.
+bool GFX_EXPORT SkApproximateTransferFn(sk_sp<SkICC> sk_icc,
+ float* max_error,
+ SkColorSpaceTransferFn* fn);
+
bool GFX_EXPORT SkMatrixIsApproximatelyIdentity(const SkMatrix44& m);
} // namespace gfx
« no previous file with comments | « ui/gfx/icc_profile_unittest.cc ('k') | ui/gfx/skia_color_space_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698