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

Unified Diff: webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h

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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h
diff --git a/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h b/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h
index c84aac086f2e7d9f79079395462d46124a1427b9..9ac15a1ed5de1ec19b3223e655da580ddadf2be7 100644
--- a/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h
+++ b/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h
@@ -13,6 +13,8 @@
#include "webrtc/modules/desktop_capture/screen_capturer.h"
+#include <D3DCommon.h>
+
#include <memory>
#include <vector>
@@ -24,13 +26,24 @@
namespace webrtc {
-// ScreenCapturerWinDirectx captures 32bit RGBA using DirectX. This
-// implementation won't work when ScreenCaptureFrameQueue.kQueueLength is not 2.
+// ScreenCapturerWinDirectx captures 32bit RGBA using DirectX.
class ScreenCapturerWinDirectx : public ScreenCapturer {
public:
+ using D3dInfo = DxgiDuplicatorController::D3dInfo;
+
// Whether the system supports DirectX based capturing.
static bool IsSupported();
+ // Returns a most recent D3dInfo composed by
+ // DxgiDuplicatorController::Initialize() function. This function implicitly
+ // calls DxgiDuplicatorController::Initialize() if it has not been
+ // initialized. This function returns false and output parameter is kept
+ // unchanged if DxgiDuplicatorController::Initialize() failed.
+ // The D3dInfo may change based on hardware configuration even without
+ // restarting the hardware and software. Refer to https://goo.gl/OOCppq. So
+ // consumers should not cache the result returned by this function.
+ static bool RetrieveD3dInfo(D3dInfo* info);
+
explicit ScreenCapturerWinDirectx(const DesktopCaptureOptions& options);
~ScreenCapturerWinDirectx() override;

Powered by Google App Engine
This is Rietveld 408576698