From 3348ae2b97f7f14de7dcf911bfd3e8c571d7174a Mon Sep 17 00:00:00 2001 From: "sergeyu@chromium.org" Date: Fri, 21 Jun 2013 23:33:10 +0000 Subject: [PATCH] mac: Mark kCGLPFAFullScreen as allowed in a 10.6-only function. kCGLPFAFullScreen is marked deprecated starting with 10.6 in the 10.9 SDK, but it's functional on 10.6 and this code only runs on 10.6 and will go away when support for 10.6 is dropped. BUG=webrtc:1958 R=sergeyu@chromium.org Review URL: https://webrtc-codereview.appspot.com/1710004 Patch from Nico Weber . git-svn-id: http://webrtc.googlecode.com/svn/trunk@4255 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/desktop_capture/screen_capturer_mac.mm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/webrtc/modules/desktop_capture/screen_capturer_mac.mm b/webrtc/modules/desktop_capture/screen_capturer_mac.mm index 435e3be67..8ec4ccedf 100644 --- a/webrtc/modules/desktop_capture/screen_capturer_mac.mm +++ b/webrtc/modules/desktop_capture/screen_capturer_mac.mm @@ -721,7 +721,14 @@ void ScreenCapturerMac::ScreenConfigurationChanged() { LOG(LS_INFO) << "Using GlBlit"; CGLPixelFormatAttribute attributes[] = { + // This function does an early return if IsOSLionOrLater(), this code only + // runs on 10.6 and can be deleted once 10.6 support is dropped. So just + // keep using kCGLPFAFullScreen even though it was deprecated in 10.6 -- + // it's still functional there, and it's not used on newer OS X versions. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" kCGLPFAFullScreen, +#pragma clang diagnostic pop kCGLPFADisplayMask, (CGLPixelFormatAttribute)CGDisplayIDToOpenGLDisplayMask(mainDevice), (CGLPixelFormatAttribute)0