| 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",
|
|
|