OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | |
3 * | |
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 | |
6 * tree. An additional intellectual property rights grant can be found | |
7 * in the file PATENTS. All contributing project authors may | |
8 * be found in the AUTHORS file in the root of the source tree. | |
9 */ | |
10 | |
11 #ifndef MODULES_DESKTOP_CAPTURE_WIN_DXGI_CONTEXT_H_ | |
12 #define MODULES_DESKTOP_CAPTURE_WIN_DXGI_CONTEXT_H_ | |
13 | |
14 #include <vector> | |
15 | |
16 #include "webrtc/modules/desktop_capture/desktop_region.h" | |
17 | |
18 namespace webrtc { | |
19 | |
20 class DxgiOutputContext { | |
21 private: | |
22 friend class DxgiOutputDuplicator; | |
23 | |
24 // The updated region DxgiOutputDuplicator::DetectUpdatedRegion() output | |
25 // during last Duplicate() function call. It's a DesktopRegion translated by | |
26 // offset of each DxgiOutputDuplicator instance. | |
27 DesktopRegion updated_region_; | |
28 }; | |
29 | |
30 class DxgiAdapterContext { | |
31 private: | |
32 friend class DxgiAdapterDuplicator; | |
33 | |
34 // Child DxgiOutputContext belongs to this DxgiAdapterContext. | |
35 std::vector<DxgiOutputContext> contexts_; | |
Sergey Ulanov
2016/07/30 00:49:22
DxgiOutputDuplicator holds pointer to list of regi
Hzj_jie
2016/07/31 22:04:42
DxgiAdapterContext::contexts_ won't change during
| |
36 }; | |
37 | |
38 // A context to store the status of a single consumer of | |
39 // DxgiDuplicatorController. Consumers should create an instance of DxgiContext | |
40 // and keep it through their lifetime, and send it as parameter to | |
41 // DxgiDuplicatorController Duplicate() functions. For details, please refer to | |
42 // comments of DxgiDuplicatorController. | |
43 class DxgiContext { | |
Sergey Ulanov
2016/07/30 00:49:22
If you move this class to dxgi_duplicator_controll
Hzj_jie
2016/07/31 22:04:42
Done.
| |
44 public: | |
45 // Unregister this DxgiContext instance from all Dxgi duplicators during | |
46 // destructing. | |
47 ~DxgiContext(); | |
48 | |
49 private: | |
50 friend class DxgiDuplicatorController; | |
51 | |
52 // A DxgiContext will have an exactly same |identity_| as | |
53 // DxgiDuplicatorController, to ensure it has been correctly setted up after | |
54 // each DxgiDuplicatorController::Initialize(). | |
55 int identity_ = 0; | |
56 | |
57 // Child DxgiAdapterContext belongs to this DxgiContext. | |
58 std::vector<DxgiAdapterContext> contexts_; | |
59 }; | |
60 | |
61 } // namespace webrtc | |
62 | |
63 #endif // MODULES_DESKTOP_CAPTURE_WIN_DXGI_CONTEXT_H_ | |
OLD | NEW |