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

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

Issue 2409833002: Remove DesktopRegion parameter in DesktopCapturer::Capture. (Closed)
Patch Set: Change Capture2 to CaptureFrame Created 4 years, 2 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 if (dwmapi_library_) 65 if (dwmapi_library_)
66 FreeLibrary(dwmapi_library_); 66 FreeLibrary(dwmapi_library_);
67 } 67 }
68 68
69 void ScreenCapturerWinGdi::SetSharedMemoryFactory( 69 void ScreenCapturerWinGdi::SetSharedMemoryFactory(
70 std::unique_ptr<SharedMemoryFactory> shared_memory_factory) { 70 std::unique_ptr<SharedMemoryFactory> shared_memory_factory) {
71 shared_memory_factory_ = std::move(shared_memory_factory); 71 shared_memory_factory_ = std::move(shared_memory_factory);
72 } 72 }
73 73
74 void ScreenCapturerWinGdi::Capture(const DesktopRegion& region) { 74 void ScreenCapturerWinGdi::CaptureFrame() {
75 int64_t capture_start_time_nanos = rtc::TimeNanos(); 75 int64_t capture_start_time_nanos = rtc::TimeNanos();
76 76
77 queue_.MoveToNextFrame(); 77 queue_.MoveToNextFrame();
78 RTC_DCHECK(!queue_.current_frame() || !queue_.current_frame()->IsShared()); 78 RTC_DCHECK(!queue_.current_frame() || !queue_.current_frame()->IsShared());
79 79
80 // Make sure the GDI capture resources are up-to-date. 80 // Make sure the GDI capture resources are up-to-date.
81 PrepareCaptureResources(); 81 PrepareCaptureResources();
82 82
83 if (!CaptureImage()) { 83 if (!CaptureImage()) {
84 callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr); 84 callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 SRCCOPY | CAPTUREBLT); 219 SRCCOPY | CAPTUREBLT);
220 220
221 // Select back the previously selected object to that the device contect 221 // Select back the previously selected object to that the device contect
222 // could be destroyed independently of the bitmap if needed. 222 // could be destroyed independently of the bitmap if needed.
223 SelectObject(memory_dc_, previous_object); 223 SelectObject(memory_dc_, previous_object);
224 } 224 }
225 return true; 225 return true;
226 } 226 }
227 227
228 } // namespace webrtc 228 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698