| 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 |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 }; | 383 }; |
| 384 | 384 |
| 385 ScreenCapturerMac::ScreenCapturerMac( | 385 ScreenCapturerMac::ScreenCapturerMac( |
| 386 rtc::scoped_refptr<DesktopConfigurationMonitor> desktop_config_monitor) | 386 rtc::scoped_refptr<DesktopConfigurationMonitor> desktop_config_monitor) |
| 387 : desktop_config_monitor_(desktop_config_monitor) { | 387 : desktop_config_monitor_(desktop_config_monitor) { |
| 388 display_stream_manager_ = new DisplayStreamManager; | 388 display_stream_manager_ = new DisplayStreamManager; |
| 389 } | 389 } |
| 390 | 390 |
| 391 ScreenCapturerMac::~ScreenCapturerMac() { | 391 ScreenCapturerMac::~ScreenCapturerMac() { |
| 392 ReleaseBuffers(); | 392 ReleaseBuffers(); |
| 393 UnregisterRefreshAndMoveHandlers(); |
| 393 display_stream_manager_->PrepareForSelfDestruction(); | 394 display_stream_manager_->PrepareForSelfDestruction(); |
| 394 UnregisterRefreshAndMoveHandlers(); | |
| 395 dlclose(app_services_library_); | 395 dlclose(app_services_library_); |
| 396 dlclose(opengl_library_); | 396 dlclose(opengl_library_); |
| 397 } | 397 } |
| 398 | 398 |
| 399 bool ScreenCapturerMac::Init() { | 399 bool ScreenCapturerMac::Init() { |
| 400 desktop_config_monitor_->Lock(); | 400 desktop_config_monitor_->Lock(); |
| 401 desktop_config_ = desktop_config_monitor_->desktop_configuration(); | 401 desktop_config_ = desktop_config_monitor_->desktop_configuration(); |
| 402 desktop_config_monitor_->Unlock(); | 402 desktop_config_monitor_->Unlock(); |
| 403 if (!RegisterRefreshAndMoveHandlers()) { | 403 if (!RegisterRefreshAndMoveHandlers()) { |
| 404 return false; | 404 return false; |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1031 } | 1031 } |
| 1032 | 1032 |
| 1033 if (options.detect_updated_region()) { | 1033 if (options.detect_updated_region()) { |
| 1034 capturer.reset(new ScreenCapturerDifferWrapper(std::move(capturer))); | 1034 capturer.reset(new ScreenCapturerDifferWrapper(std::move(capturer))); |
| 1035 } | 1035 } |
| 1036 | 1036 |
| 1037 return capturer.release(); | 1037 return capturer.release(); |
| 1038 } | 1038 } |
| 1039 | 1039 |
| 1040 } // namespace webrtc | 1040 } // namespace webrtc |
| OLD | NEW |