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

Side by Side Diff: webrtc/modules/desktop_capture/win/screen_capturer_win_directx.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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 DesktopSize ScreenCapturerWinDirectx::SelectedDesktopSize() const { 48 DesktopSize ScreenCapturerWinDirectx::SelectedDesktopSize() const {
49 if (current_screen_id == kFullDesktopScreenId) { 49 if (current_screen_id == kFullDesktopScreenId) {
50 return DxgiDuplicatorController::Instance()->desktop_size(); 50 return DxgiDuplicatorController::Instance()->desktop_size();
51 } 51 }
52 return DxgiDuplicatorController::Instance() 52 return DxgiDuplicatorController::Instance()
53 ->ScreenRect(current_screen_id) 53 ->ScreenRect(current_screen_id)
54 .size(); 54 .size();
55 } 55 }
56 56
57 void ScreenCapturerWinDirectx::Capture(const DesktopRegion& region) { 57 void ScreenCapturerWinDirectx::CaptureFrame() {
58 RTC_DCHECK(callback_); 58 RTC_DCHECK(callback_);
59 59
60 int64_t capture_start_time_nanos = rtc::TimeNanos(); 60 int64_t capture_start_time_nanos = rtc::TimeNanos();
61 61
62 frames_.MoveToNextFrame(); 62 frames_.MoveToNextFrame();
63 if (!frames_.current_frame()) { 63 if (!frames_.current_frame()) {
64 std::unique_ptr<DesktopFrame> new_frame; 64 std::unique_ptr<DesktopFrame> new_frame;
65 if (shared_memory_factory_) { 65 if (shared_memory_factory_) {
66 new_frame = SharedMemoryDesktopFrame::Create( 66 new_frame = SharedMemoryDesktopFrame::Create(
67 SelectedDesktopSize(), shared_memory_factory_.get()); 67 SelectedDesktopSize(), shared_memory_factory_.get());
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 int screen_count = DxgiDuplicatorController::Instance()->ScreenCount(); 132 int screen_count = DxgiDuplicatorController::Instance()->ScreenCount();
133 if (id >= 0 && id < screen_count) { 133 if (id >= 0 && id < screen_count) {
134 current_screen_id = id; 134 current_screen_id = id;
135 return true; 135 return true;
136 } 136 }
137 return false; 137 return false;
138 } 138 }
139 139
140 } // namespace webrtc 140 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698