Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(978)

Side by Side Diff: webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc

Issue 1914153002: Remove calls to ScopedToUnique and UniqueToScoped (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@base-fix
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 rtc::scoped_ptr<SharedMemoryFactory> shared_memory_factory) { 77 rtc::scoped_ptr<SharedMemoryFactory> shared_memory_factory) {
78 shared_memory_factory_ = 78 shared_memory_factory_ = std::move(shared_memory_factory);
79 rtc::ScopedToUnique(std::move(shared_memory_factory));
80 } 79 }
81 80
82 void ScreenCapturerWinGdi::Capture(const DesktopRegion& region) { 81 void ScreenCapturerWinGdi::Capture(const DesktopRegion& region) {
83 TickTime capture_start_time = TickTime::Now(); 82 TickTime capture_start_time = TickTime::Now();
84 83
85 queue_.MoveToNextFrame(); 84 queue_.MoveToNextFrame();
86 RTC_DCHECK(!queue_.current_frame() || !queue_.current_frame()->IsShared()); 85 RTC_DCHECK(!queue_.current_frame() || !queue_.current_frame()->IsShared());
87 86
88 // 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.
89 if (!SetThreadExecutionState(ES_DISPLAY_REQUIRED | ES_SYSTEM_REQUIRED)) { 88 if (!SetThreadExecutionState(ES_DISPLAY_REQUIRED | ES_SYSTEM_REQUIRED)) {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 SRCCOPY | CAPTUREBLT); 266 SRCCOPY | CAPTUREBLT);
268 267
269 // Select back the previously selected object to that the device contect 268 // Select back the previously selected object to that the device contect
270 // could be destroyed independently of the bitmap if needed. 269 // could be destroyed independently of the bitmap if needed.
271 SelectObject(memory_dc_, previous_object); 270 SelectObject(memory_dc_, previous_object);
272 } 271 }
273 return true; 272 return true;
274 } 273 }
275 274
276 } // namespace webrtc 275 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698