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

Unified Diff: ui/gfx/icc_profile_mac.mm

Issue 2924743002: gfx_unittests builds on 10.13 (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | ui/gfx/mac/io_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/icc_profile_mac.mm
diff --git a/ui/gfx/icc_profile_mac.mm b/ui/gfx/icc_profile_mac.mm
index 1aa768cc699f79ef837737d921c31454e0052dbb..05875011dbaa32d1944935b180965ff44e1385e4 100644
--- a/ui/gfx/icc_profile_mac.mm
+++ b/ui/gfx/icc_profile_mac.mm
@@ -19,8 +19,10 @@ ICCProfile ICCProfile::FromCGColorSpace(CGColorSpaceRef cg_color_space) {
if (HasForcedProfile())
return GetForcedProfile();
- base::ScopedCFTypeRef<CFDataRef> cf_icc_profile(
- CGColorSpaceCopyICCProfile(cg_color_space));
+ base::ScopedCFTypeRef<CFDataRef> cf_icc_profile;
+ if (__builtin_available(macOS 10.12, *)) {
+ cf_icc_profile.reset(CGColorSpaceCopyICCProfile(cg_color_space));
+ }
if (!cf_icc_profile)
return gfx::ICCProfile();
size_t length = CFDataGetLength(cf_icc_profile);
@@ -31,3 +33,11 @@ ICCProfile ICCProfile::FromCGColorSpace(CGColorSpaceRef cg_color_space) {
}
} // namespace gfx
+
+extern "C" {
+
+// This does not belong here..
+int32_t __isOSVersionAtLeast(int32_t Major, int32_t Minor, int32_t Subminor) {
+ return 0;
+}
+}
« no previous file with comments | « no previous file | ui/gfx/mac/io_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698