| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #include <stddef.h> | 11 #include <stddef.h> |
| 12 | 12 |
| 13 #include <memory> | 13 #include <memory> |
| 14 #include <set> | 14 #include <set> |
| 15 #include <utility> | 15 #include <utility> |
| 16 | 16 |
| 17 #include <ApplicationServices/ApplicationServices.h> | 17 #include <ApplicationServices/ApplicationServices.h> |
| 18 #include <Cocoa/Cocoa.h> | 18 #include <Cocoa/Cocoa.h> |
| 19 #include <CoreGraphics/CoreGraphics.h> | 19 #include <CoreGraphics/CoreGraphics.h> |
| 20 #include <dlfcn.h> | 20 #include <dlfcn.h> |
| 21 #include <OpenGL/CGLMacro.h> | 21 #include <OpenGL/CGLMacro.h> |
| 22 #include <OpenGL/OpenGL.h> | 22 #include <OpenGL/OpenGL.h> |
| 23 | 23 |
| 24 #include "webrtc/base/checks.h" | 24 #include "webrtc/base/checks.h" |
| 25 #include "webrtc/base/constructormagic.h" | 25 #include "webrtc/base/constructormagic.h" |
| 26 #include "webrtc/base/logging.h" |
| 26 #include "webrtc/base/macutils.h" | 27 #include "webrtc/base/macutils.h" |
| 27 #include "webrtc/base/timeutils.h" | 28 #include "webrtc/base/timeutils.h" |
| 28 #include "webrtc/modules/desktop_capture/desktop_capturer.h" | 29 #include "webrtc/modules/desktop_capture/desktop_capturer.h" |
| 29 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" | 30 #include "webrtc/modules/desktop_capture/desktop_capture_options.h" |
| 30 #include "webrtc/modules/desktop_capture/desktop_frame.h" | 31 #include "webrtc/modules/desktop_capture/desktop_frame.h" |
| 31 #include "webrtc/modules/desktop_capture/desktop_geometry.h" | 32 #include "webrtc/modules/desktop_capture/desktop_geometry.h" |
| 32 #include "webrtc/modules/desktop_capture/desktop_region.h" | 33 #include "webrtc/modules/desktop_capture/desktop_region.h" |
| 33 #include "webrtc/modules/desktop_capture/mac/desktop_configuration.h" | 34 #include "webrtc/modules/desktop_capture/mac/desktop_configuration.h" |
| 34 #include "webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h" | 35 #include "webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h" |
| 35 #include "webrtc/modules/desktop_capture/mac/scoped_pixel_buffer_object.h" | 36 #include "webrtc/modules/desktop_capture/mac/scoped_pixel_buffer_object.h" |
| 36 #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h" | 37 #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h" |
| 37 #include "webrtc/modules/desktop_capture/screen_capturer_helper.h" | 38 #include "webrtc/modules/desktop_capture/screen_capturer_helper.h" |
| 38 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" | 39 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" |
| 39 #include "webrtc/system_wrappers/include/logging.h" | |
| 40 | 40 |
| 41 // Once Chrome no longer supports OSX 10.8, everything within this | 41 // Once Chrome no longer supports OSX 10.8, everything within this |
| 42 // preprocessor block can be removed. https://crbug.com/579255 | 42 // preprocessor block can be removed. https://crbug.com/579255 |
| 43 #if !defined(MAC_OS_X_VERSION_10_9) || \ | 43 #if !defined(MAC_OS_X_VERSION_10_9) || \ |
| 44 MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9 | 44 MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9 |
| 45 CG_EXTERN const CGRect* CGDisplayStreamUpdateGetRects( | 45 CG_EXTERN const CGRect* CGDisplayStreamUpdateGetRects( |
| 46 CGDisplayStreamUpdateRef updateRef, | 46 CGDisplayStreamUpdateRef updateRef, |
| 47 CGDisplayStreamUpdateRectType rectType, | 47 CGDisplayStreamUpdateRectType rectType, |
| 48 size_t* rectCount); | 48 size_t* rectCount); |
| 49 CG_EXTERN CFRunLoopSourceRef | 49 CG_EXTERN CFRunLoopSourceRef |
| (...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1036 std::unique_ptr<ScreenCapturerMac> capturer( | 1036 std::unique_ptr<ScreenCapturerMac> capturer( |
| 1037 new ScreenCapturerMac(options.configuration_monitor())); | 1037 new ScreenCapturerMac(options.configuration_monitor())); |
| 1038 if (!capturer.get()->Init()) { | 1038 if (!capturer.get()->Init()) { |
| 1039 return nullptr; | 1039 return nullptr; |
| 1040 } | 1040 } |
| 1041 | 1041 |
| 1042 return capturer; | 1042 return capturer; |
| 1043 } | 1043 } |
| 1044 | 1044 |
| 1045 } // namespace webrtc | 1045 } // namespace webrtc |
| OLD | NEW |