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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 // Restore Aero. | 68 // Restore Aero. |
69 if (composition_func_) | 69 if (composition_func_) |
70 (*composition_func_)(DWM_EC_ENABLECOMPOSITION); | 70 (*composition_func_)(DWM_EC_ENABLECOMPOSITION); |
71 | 71 |
72 if (dwmapi_library_) | 72 if (dwmapi_library_) |
73 FreeLibrary(dwmapi_library_); | 73 FreeLibrary(dwmapi_library_); |
74 } | 74 } |
75 | 75 |
76 void ScreenCapturerWinGdi::SetSharedMemoryFactory( | 76 void ScreenCapturerWinGdi::SetSharedMemoryFactory( |
77 std::unique_ptr<SharedMemoryFactory> shared_memory_factory) { | 77 rtc::scoped_ptr<SharedMemoryFactory> shared_memory_factory) { |
78 shared_memory_factory_ = std::move(shared_memory_factory); | 78 shared_memory_factory_ = std::move(shared_memory_factory); |
79 } | 79 } |
80 | 80 |
81 void ScreenCapturerWinGdi::Capture(const DesktopRegion& region) { | 81 void ScreenCapturerWinGdi::Capture(const DesktopRegion& region) { |
82 TickTime capture_start_time = TickTime::Now(); | 82 TickTime capture_start_time = TickTime::Now(); |
83 | 83 |
84 queue_.MoveToNextFrame(); | 84 queue_.MoveToNextFrame(); |
85 RTC_DCHECK(!queue_.current_frame() || !queue_.current_frame()->IsShared()); | 85 RTC_DCHECK(!queue_.current_frame() || !queue_.current_frame()->IsShared()); |
86 | 86 |
87 // Request that the system not power-down the system, or the display hardware. | 87 // Request that the system not power-down the system, or the display hardware. |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 SRCCOPY | CAPTUREBLT); | 266 SRCCOPY | CAPTUREBLT); |
267 | 267 |
268 // Select back the previously selected object to that the device contect | 268 // Select back the previously selected object to that the device contect |
269 // could be destroyed independently of the bitmap if needed. | 269 // could be destroyed independently of the bitmap if needed. |
270 SelectObject(memory_dc_, previous_object); | 270 SelectObject(memory_dc_, previous_object); |
271 } | 271 } |
272 return true; | 272 return true; |
273 } | 273 } |
274 | 274 |
275 } // namespace webrtc | 275 } // namespace webrtc |
OLD | NEW |