[go: nahoru, domu]

Make YUVA tone mapping functional

Make YUVA PQ and HLG images be tone mapped. Add a gfx::ColorSpace
method IsPQOrHLG, since that comes up often.

In ColorConversionSkFilterCache::ConvertImage, change the way that
we avoid color conversion. We wish for no color conversion to happen,
because we are doing it manually in our own shader. Previously, we
set the source image's color space to the destination's color space.
This doesn't work on YUV images (the results are not right). Perhaps
it should work. In the mean time, it's just as easy to set the
destination's color space to the source, which does work.

Bug: 1286088
Change-Id: I01884391a6e5201fe3babceee90706d7b3adcdb8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3490056
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: ccameron chromium <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#975414}
diff --git a/cc/BUILD.gn b/cc/BUILD.gn
index 86e24b4..091ec28 100644
--- a/cc/BUILD.gn
+++ b/cc/BUILD.gn
@@ -465,6 +465,7 @@
     "//services/metrics/public/cpp:ukm_builders",
     "//services/metrics/public/mojom",
     "//services/tracing/public/cpp:cpp",
+    "//skia:skcms",
     "//ui/base:features",
     "//ui/events:events_base",
     "//ui/gfx",