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

Unified Diff: webrtc/modules/desktop_capture/desktop_frame_win.h

Issue 1845113002: DirectX based screen capturer logic (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/desktop_capture/desktop_frame_win.h
diff --git a/webrtc/modules/desktop_capture/desktop_frame_win.h b/webrtc/modules/desktop_capture/desktop_frame_win.h
index 929d23c0e56af6fcef478aadf62877ab64f9b150..028c5890a0e519e1ea5e75e6f857e11838770f28 100644
--- a/webrtc/modules/desktop_capture/desktop_frame_win.h
+++ b/webrtc/modules/desktop_capture/desktop_frame_win.h
@@ -13,7 +13,9 @@
#include <memory>
+#include <DXGI.h>
#include <windows.h>
+#include <wrl/client.h>
#include "webrtc/modules/desktop_capture/desktop_frame.h"
#include "webrtc/typedefs.h"
@@ -44,6 +46,24 @@ class DesktopFrameWin : public DesktopFrame {
RTC_DISALLOW_COPY_AND_ASSIGN(DesktopFrameWin);
};
+// DesktopFrame implementation used by screen captures on Windows.
+// Frame data is stored in a IDXGISurface instance.
+class DesktopFrameWinDXGI : public DesktopFrame {
Sergey Ulanov 2016/03/31 18:41:15 Put this to a separate file (in win directory)? It
Sergey Ulanov 2016/03/31 18:41:15 Call this DesktopFrameWinDxgi. Style guide is not
Hzj_jie 2016/04/05 23:15:17 Done.
Hzj_jie 2016/04/05 23:15:17 Done.
+ public:
+ virtual ~DesktopFrameWinDXGI();
+ DesktopFrameWinDXGI(DesktopSize size,
+ Microsoft::WRL::ComPtr<IDXGISurface> surface,
+ DXGI_MAPPED_RECT rect);
+
+ // Create a valid but empty DesktopFrame, no updated regions.
+ DesktopFrameWinDXGI(DesktopSize size);
Sergey Ulanov 2016/03/31 18:41:15 Do you need this constructor? You could also use B
Hzj_jie 2016/04/05 23:15:17 Done.
+
+ private:
+ // Make sure IDXGISurface won't be recycled during the lifetime of this
+ // instance.
+ Microsoft::WRL::ComPtr<IDXGISurface> surface_;
+};
Sergey Ulanov 2016/03/31 18:41:15 add RTC_DISALLOW_COPY_AND_ASSIGN()
Hzj_jie 2016/04/05 23:15:17 Done.
+
} // namespace webrtc
#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698