Commit fc14a795 authored by Mark Mentovai's avatar Mark Mentovai Committed by Commit Bot

mac: Work around Xcode 12b3 SDK bug

The macOS 11.0 20A5323l SDK in Xcode 12b3 12A8169g totally hides the
kCGColorSpaceITUR_2020_PQ_EOTF declaration in an #if whenever the SDK
version is ≥ 10.16, which of course it always is. Chrome does use that
constant, so work around the SDK bug by providing our a local
declaration when that SDK version is in use.

Bug: 1108561
Change-Id: I6ed31d30705bc754616e413c38fb250a7934484d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2315078Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791119}
parent 1b5394a0
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include "ui/gfx/mac/io_surface.h" #include "ui/gfx/mac/io_surface.h"
#include <Availability.h>
#include <CoreGraphics/CoreGraphics.h>
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
...@@ -17,6 +19,19 @@ ...@@ -17,6 +19,19 @@
#include "ui/gfx/buffer_format_util.h" #include "ui/gfx/buffer_format_util.h"
#include "ui/gfx/icc_profile.h" #include "ui/gfx/icc_profile.h"
#if defined(__MAC_11_0) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_16
// https://crbug.com/1108561: This is supposed to be deprecated (but available)
// through 10.15.4, but the macOS 11.0 20A5323l SDK from Xcode 12b3 12A8169g
// doesn’t declare it at all when the SDK version is 10.16 or later, which of
// course it always is. It’s a bug in the SDK. Work around it with the
// declaration that’s hidden.
//
// TODO(https://crbug.com/1108627): remove this workaround if and when the SDK
// bug is fixed.
CG_EXTERN const CFStringRef kCGColorSpaceITUR_2020_PQ_EOTF
CG_AVAILABLE_BUT_DEPRECATED(10.14.6, 10.15.4, 12.6, 13.4);
#endif
namespace gfx { namespace gfx {
namespace { namespace {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment