| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 void ScreenCapturerWinMagnifier::Start(Callback* callback) { | 76 void ScreenCapturerWinMagnifier::Start(Callback* callback) { |
| 77 assert(!callback_); | 77 assert(!callback_); |
| 78 assert(callback); | 78 assert(callback); |
| 79 callback_ = callback; | 79 callback_ = callback; |
| 80 | 80 |
| 81 InitializeMagnifier(); | 81 InitializeMagnifier(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void ScreenCapturerWinMagnifier::SetSharedMemoryFactory( | 84 void ScreenCapturerWinMagnifier::SetSharedMemoryFactory( |
| 85 rtc::scoped_ptr<SharedMemoryFactory> shared_memory_factory) { | 85 rtc::scoped_ptr<SharedMemoryFactory> shared_memory_factory) { |
| 86 shared_memory_factory_ = | 86 shared_memory_factory_ = std::move(shared_memory_factory); |
| 87 rtc::ScopedToUnique(std::move(shared_memory_factory)); | |
| 88 } | 87 } |
| 89 | 88 |
| 90 void ScreenCapturerWinMagnifier::Capture(const DesktopRegion& region) { | 89 void ScreenCapturerWinMagnifier::Capture(const DesktopRegion& region) { |
| 91 TickTime capture_start_time = TickTime::Now(); | 90 TickTime capture_start_time = TickTime::Now(); |
| 92 | 91 |
| 93 queue_.MoveToNextFrame(); | 92 queue_.MoveToNextFrame(); |
| 94 | 93 |
| 95 // Request that the system not power-down the system, or the display hardware. | 94 // Request that the system not power-down the system, or the display hardware. |
| 96 if (!SetThreadExecutionState(ES_DISPLAY_REQUIRED | ES_SYSTEM_REQUIRED)) { | 95 if (!SetThreadExecutionState(ES_DISPLAY_REQUIRED | ES_SYSTEM_REQUIRED)) { |
| 97 if (!set_thread_execution_state_failed_) { | 96 if (!set_thread_execution_state_failed_) { |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 assert(fallback_capturer_); | 440 assert(fallback_capturer_); |
| 442 if (!fallback_capturer_started_) { | 441 if (!fallback_capturer_started_) { |
| 443 fallback_capturer_started_ = true; | 442 fallback_capturer_started_ = true; |
| 444 | 443 |
| 445 fallback_capturer_->Start(callback_); | 444 fallback_capturer_->Start(callback_); |
| 446 fallback_capturer_->SelectScreen(current_screen_id_); | 445 fallback_capturer_->SelectScreen(current_screen_id_); |
| 447 } | 446 } |
| 448 } | 447 } |
| 449 | 448 |
| 450 } // namespace webrtc | 449 } // namespace webrtc |
| OLD | NEW |