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

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

Issue 2468083002: Remove the requirement of D3D_FEATURE_LEVEL_11_0, but export the D3D_FEATURE_LEVEL through APIs (Closed)
Patch Set: Resolve review comments Created 4 years, 1 month 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
« no previous file with comments | « webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 #include "webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h" 11 #include "webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h"
12 12
13 #include <utility> 13 #include <utility>
14 14
15 #include "webrtc/base/checks.h" 15 #include "webrtc/base/checks.h"
16 #include "webrtc/base/logging.h" 16 #include "webrtc/base/logging.h"
17 #include "webrtc/base/timeutils.h" 17 #include "webrtc/base/timeutils.h"
18 #include "webrtc/modules/desktop_capture/desktop_frame.h" 18 #include "webrtc/modules/desktop_capture/desktop_frame.h"
19 19
20 namespace webrtc { 20 namespace webrtc {
21 21
22 using Microsoft::WRL::ComPtr; 22 using Microsoft::WRL::ComPtr;
23 23
24 // static 24 // static
25 bool ScreenCapturerWinDirectx::IsSupported() { 25 bool ScreenCapturerWinDirectx::IsSupported() {
26 // Forward IsSupported function call to DxgiDuplicatorController. 26 // Forwards IsSupported() function call to DxgiDuplicatorController.
27 return DxgiDuplicatorController::Instance()->IsSupported(); 27 return DxgiDuplicatorController::Instance()->IsSupported();
28 } 28 }
29 29
30 // static
31 bool ScreenCapturerWinDirectx::RetrieveD3dInfo(D3dInfo* info) {
32 // Forwards SupportedFeatureLevels() function call to
33 // DxgiDuplicatorController.
34 return DxgiDuplicatorController::Instance()->RetrieveD3dInfo(info);
35 }
36
30 ScreenCapturerWinDirectx::ScreenCapturerWinDirectx( 37 ScreenCapturerWinDirectx::ScreenCapturerWinDirectx(
31 const DesktopCaptureOptions& options) 38 const DesktopCaptureOptions& options)
32 : callback_(nullptr) {} 39 : callback_(nullptr) {}
33 40
34 ScreenCapturerWinDirectx::~ScreenCapturerWinDirectx() {} 41 ScreenCapturerWinDirectx::~ScreenCapturerWinDirectx() {}
35 42
36 void ScreenCapturerWinDirectx::Start(Callback* callback) { 43 void ScreenCapturerWinDirectx::Start(Callback* callback) {
37 RTC_DCHECK(!callback_); 44 RTC_DCHECK(!callback_);
38 RTC_DCHECK(callback); 45 RTC_DCHECK(callback);
39 46
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 138
132 int screen_count = DxgiDuplicatorController::Instance()->ScreenCount(); 139 int screen_count = DxgiDuplicatorController::Instance()->ScreenCount();
133 if (id >= 0 && id < screen_count) { 140 if (id >= 0 && id < screen_count) {
134 current_screen_id_ = id; 141 current_screen_id_ = id;
135 return true; 142 return true;
136 } 143 }
137 return false; 144 return false;
138 } 145 }
139 146
140 } // namespace webrtc 147 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698