Apple renamed CGColorSpaceCopyICCProfile to CGColorSpaceCopyICCData in
10.13. If you compile code with a minimum OS required of 10.13 or
newer, [-Werror,-Wdeprecated-declarations] will cause an error to
occur on use of the function with the old name.
Add a compile switch so that no error is emitted regardless of the
deployment configuration.
Bug: chromium:1322548
Change-Id: Ie969aa9e5c4fc9bee2ec88b126d4c07701c3e9e6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261953
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#36855}
And fill-in icc profile from the various window and screen capturers.
Done on WindowCapturerMac, ScreenCapturerMac, WindowCapturerX11
and ScreenCapturerX11. Follow-up CLs will do it on ScreenCapturerWinDirectx
and ScreenCapturerPipeWire.
Useful to build the gfx::ColorSpace in chromium, especially
from src/content/browser/media/capture/desktop_capture_device.cc.
We do not build the color space directly here to avoid duplicating
ui/gfx/icc_profile.h,cc code from chromium, which one implements
icc profile caching.
Bug: chromium:945468
Change-Id: Id6e3920233771e035f7578847406bf1f519dcd49
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133580
Commit-Queue: Julien Isorce <julien.isorce@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Brave Yao <braveyao@webrtc.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#27697}
By wraping the cg_data instead of copying it. We had the infrastructure
for it since the work around iosurface, we were just not using it.
Also having a centralized DesktopFrameCGImage::CreateFromCGImage helper
will be useful to parse the ICC Profile at only one place.
Bug: chromium:945468
Change-Id: I69f179064fd9045d992a7baea35820c38e24dacc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133640
Commit-Queue: Julien Isorce <julien.isorce@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#27696}