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

Unified Diff: ui/gfx/mac/io_surface.cc

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 | « ui/gfx/icc_profile_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/mac/io_surface.cc
diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc
index 90dadff5dd1100e922b5953d115a89f68b93a763..4ecd2e26e3e1149723245e6e4515422b47643393 100644
--- a/ui/gfx/mac/io_surface.cc
+++ b/ui/gfx/mac/io_surface.cc
@@ -219,10 +219,12 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size, gfx::BufferFormat format) {
CGColorSpaceRef color_space = color_correct_rendering_enabled
? base::mac::GetSRGBColorSpace()
: base::mac::GetSystemColorSpace();
- base::ScopedCFTypeRef<CFDataRef> color_space_icc(
- CGColorSpaceCopyICCProfile(color_space));
- // Note that nullptr is an acceptable input to IOSurfaceSetValue.
- IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), color_space_icc);
+ if (__builtin_available(macOS 10.12, *)) {
+ base::ScopedCFTypeRef<CFDataRef> color_space_icc(
+ CGColorSpaceCopyICCProfile(color_space));
+ // Note that nullptr is an acceptable input to IOSurfaceSetValue.
+ IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), color_space_icc);
+ }
}
UMA_HISTOGRAM_TIMES("GPU.IOSurface.CreateTime",
« no previous file with comments | « ui/gfx/icc_profile_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698