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

Side by Side Diff: webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.h

Issue 2788863006: Merge ScreenCapturerWinDirectx::frames_ and contexts_ (Closed)
Patch Set: Resolve review comments Created 3 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) 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 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_ADAPTER_DUPLICATOR_H_ 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_ADAPTER_DUPLICATOR_H_
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_ADAPTER_DUPLICATOR_H_ 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_ADAPTER_DUPLICATOR_H_
13 13
14 #include <wrl/client.h> 14 #include <wrl/client.h>
15 15
16 #include <vector> 16 #include <vector>
17 17
18 #include "webrtc/modules/desktop_capture/desktop_geometry.h" 18 #include "webrtc/modules/desktop_capture/desktop_geometry.h"
19 #include "webrtc/modules/desktop_capture/desktop_region.h"
20 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" 19 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h"
21 #include "webrtc/modules/desktop_capture/win/d3d_device.h" 20 #include "webrtc/modules/desktop_capture/win/d3d_device.h"
21 #include "webrtc/modules/desktop_capture/win/dxgi_context.h"
22 #include "webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h" 22 #include "webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h"
23 23
24 namespace webrtc { 24 namespace webrtc {
25 25
26 // A container of DxgiOutputDuplicators to duplicate monitors attached to a 26 // A container of DxgiOutputDuplicators to duplicate monitors attached to a
27 // single video card. 27 // single video card.
28 class DxgiAdapterDuplicator { 28 class DxgiAdapterDuplicator {
29 public: 29 public:
30 struct Context { 30 using Context = DxgiAdapterContext;
31 Context();
32 Context(const Context& other);
33 ~Context();
34
35 // Child DxgiOutputDuplicator::Context belongs to this
36 // DxgiAdapterDuplicator::Context.
37 std::vector<DxgiOutputDuplicator::Context> contexts;
38 };
39 31
40 // Creates an instance of DxgiAdapterDuplicator from a D3dDevice. Only 32 // Creates an instance of DxgiAdapterDuplicator from a D3dDevice. Only
41 // DxgiDuplicatorController can create an instance. 33 // DxgiDuplicatorController can create an instance.
42 explicit DxgiAdapterDuplicator(const D3dDevice& device); 34 explicit DxgiAdapterDuplicator(const D3dDevice& device);
43 35
44 // Move constructor, to make it possible to store instances of 36 // Move constructor, to make it possible to store instances of
45 // DxgiAdapterDuplicator in std::vector<>. 37 // DxgiAdapterDuplicator in std::vector<>.
46 DxgiAdapterDuplicator(DxgiAdapterDuplicator&& other); 38 DxgiAdapterDuplicator(DxgiAdapterDuplicator&& other);
47 39
48 ~DxgiAdapterDuplicator(); 40 ~DxgiAdapterDuplicator();
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 bool DoInitialize(); 75 bool DoInitialize();
84 76
85 const D3dDevice device_; 77 const D3dDevice device_;
86 std::vector<DxgiOutputDuplicator> duplicators_; 78 std::vector<DxgiOutputDuplicator> duplicators_;
87 DesktopRect desktop_rect_; 79 DesktopRect desktop_rect_;
88 }; 80 };
89 81
90 } // namespace webrtc 82 } // namespace webrtc
91 83
92 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_ADAPTER_DUPLICATOR_H_ 84 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_ADAPTER_DUPLICATOR_H_
OLDNEW
« no previous file with comments | « webrtc/modules/desktop_capture/BUILD.gn ('k') | webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698