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

Side by Side 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, 8 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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_ 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_ 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_
13 13
14 #include <memory> 14 #include <memory>
15 15
16 #include <DXGI.h>
16 #include <windows.h> 17 #include <windows.h>
18 #include <wrl/client.h>
17 19
18 #include "webrtc/modules/desktop_capture/desktop_frame.h" 20 #include "webrtc/modules/desktop_capture/desktop_frame.h"
19 #include "webrtc/typedefs.h" 21 #include "webrtc/typedefs.h"
20 22
21 namespace webrtc { 23 namespace webrtc {
22 24
23 // DesktopFrame implementation used by screen and window captures on Windows. 25 // DesktopFrame implementation used by screen and window captures on Windows.
24 // Frame data is stored in a GDI bitmap. 26 // Frame data is stored in a GDI bitmap.
25 class DesktopFrameWin : public DesktopFrame { 27 class DesktopFrameWin : public DesktopFrame {
26 public: 28 public:
(...skipping 10 matching lines...) Expand all
37 uint8_t* data, 39 uint8_t* data,
38 std::unique_ptr<SharedMemory> shared_memory, 40 std::unique_ptr<SharedMemory> shared_memory,
39 HBITMAP bitmap); 41 HBITMAP bitmap);
40 42
41 HBITMAP bitmap_; 43 HBITMAP bitmap_;
42 std::unique_ptr<SharedMemory> owned_shared_memory_; 44 std::unique_ptr<SharedMemory> owned_shared_memory_;
43 45
44 RTC_DISALLOW_COPY_AND_ASSIGN(DesktopFrameWin); 46 RTC_DISALLOW_COPY_AND_ASSIGN(DesktopFrameWin);
45 }; 47 };
46 48
49 // DesktopFrame implementation used by screen captures on Windows.
50 // Frame data is stored in a IDXGISurface instance.
51 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.
52 public:
53 virtual ~DesktopFrameWinDXGI();
54 DesktopFrameWinDXGI(DesktopSize size,
55 Microsoft::WRL::ComPtr<IDXGISurface> surface,
56 DXGI_MAPPED_RECT rect);
57
58 // Create a valid but empty DesktopFrame, no updated regions.
59 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.
60
61 private:
62 // Make sure IDXGISurface won't be recycled during the lifetime of this
63 // instance.
64 Microsoft::WRL::ComPtr<IDXGISurface> surface_;
65 };
Sergey Ulanov 2016/03/31 18:41:15 add RTC_DISALLOW_COPY_AND_ASSIGN()
Hzj_jie 2016/04/05 23:15:17 Done.
66
47 } // namespace webrtc 67 } // namespace webrtc
48 68
49 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_ 69 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_WIN_H_
50 70
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698