Fix wrong colors in Hangouts on Mac when sharing applications

In DesktopCaptureDevice, get the ICC profile of the webrtc frame
to generate a gfx::ColorSpace. Then in VideoCaptureDeviceClient,
merge the primaries and transfer function into the yuv colorspace
thanks to gfx::ColorSpace::GetWithMatrixAndRange. Otherwise the
gamma color correction is lost and rendering has wrong colors
when attaching the captured stream of the desktop to a <video> tag.

Bug: 945468
Test: content_unittests --gtest_filter=*VideoCaptureControllerTest.*ColorSpace*
Change-Id: I67c5bb01d1addc2f0282ad67a86be859ce74d592
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1542175
Commit-Queue: Julien Isorce <julien.isorce@chromium.org>
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Reviewed-by: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662069}
3 files changed