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

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

Issue 2767003002: Revert of Add DesktopCapturerId and attach it to DesktopFrame (Closed)
Patch Set: Created 3 years, 9 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr); 130 callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr);
131 } 131 }
132 return; 132 return;
133 } 133 }
134 } 134 }
135 135
136 std::unique_ptr<DesktopFrame> result = frames_.current_frame()->Share(); 136 std::unique_ptr<DesktopFrame> result = frames_.current_frame()->Share();
137 result->set_capture_time_ms( 137 result->set_capture_time_ms(
138 (rtc::TimeNanos() - capture_start_time_nanos) / 138 (rtc::TimeNanos() - capture_start_time_nanos) /
139 rtc::kNumNanosecsPerMillisec); 139 rtc::kNumNanosecsPerMillisec);
140 result->set_capturer_id(DesktopCapturerId::kScreenCapturerWinDirectx);
141 callback_->OnCaptureResult(Result::SUCCESS, std::move(result)); 140 callback_->OnCaptureResult(Result::SUCCESS, std::move(result));
142 } 141 }
143 142
144 bool ScreenCapturerWinDirectx::GetSourceList(SourceList* sources) { 143 bool ScreenCapturerWinDirectx::GetSourceList(SourceList* sources) {
145 int screen_count = DxgiDuplicatorController::Instance()->ScreenCount(); 144 int screen_count = DxgiDuplicatorController::Instance()->ScreenCount();
146 for (int i = 0; i < screen_count; i++) { 145 for (int i = 0; i < screen_count; i++) {
147 sources->push_back({i}); 146 sources->push_back({i});
148 } 147 }
149 return true; 148 return true;
150 } 149 }
(...skipping 14 matching lines...) Expand all
165 int screen_count = DxgiDuplicatorController::Instance()->ScreenCount(); 164 int screen_count = DxgiDuplicatorController::Instance()->ScreenCount();
166 if (id >= 0 && id < screen_count) { 165 if (id >= 0 && id < screen_count) {
167 current_screen_id_ = id; 166 current_screen_id_ = id;
168 context_.Reset(); 167 context_.Reset();
169 return true; 168 return true;
170 } 169 }
171 return false; 170 return false;
172 } 171 }
173 172
174 } // namespace webrtc 173 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/desktop_capture/desktop_frame.cc ('k') | webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698