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 // A context to store the status of a single consumer of | |
21 // DxgiDuplicatorContainer. Consumers should create an instance of DxgiContext | |
22 // and keep it through their lifetime, and send it as parameter to | |
23 // DxgiDuplicatorContainer public functions. For details, please refer to | |
24 // comments of DxgiDuplicatorContainer. | |
25 class DxgiContext { | |
26 public: | |
27 // Unregister this DxgiContext instance from all Dxgi duplicators during | |
28 // destructing. | |
29 ~DxgiContext(); | |
30 | |
31 private: | |
32 friend class DxgiOutputDuplicator; | |
33 friend class DxgiAdapterDuplicator; | |
34 friend class DxgiDuplicatorContainer; | |
Sergey Ulanov
2016/07/28 22:15:32
I still don't think think hiding content of this c
Hzj_jie
2016/07/29 02:12:23
Not really, indeed a consumer need to create a con
Sergey Ulanov
2016/07/30 00:49:22
In either case this usage of friend goes against s
Hzj_jie
2016/07/31 22:04:42
What I can image is a screenshot function. But no
| |
35 | |
36 // A DxgiContext will have an exactly same |identity_| as | |
37 // DxgiDuplicatorContainer, to ensure it has been correctly setted up after | |
38 // each DxgiDuplicatorContainer::Initialize(). | |
39 int identity_ = 0; | |
40 | |
41 // Child DxgiContext belongs to this DxgiContext. | |
42 std::vector<DxgiContext> contexts_; | |
Sergey Ulanov
2016/07/28 22:15:32
I still think it's wrong (it's confusing and error
Hzj_jie
2016/07/29 02:12:23
I have no strong opinion on this. But I still pref
| |
43 | |
44 // The updated region DxgiOutputDuplicator::DetectUpdatedRegion() output | |
45 // during last Duplicate() function call. It's a DesktopRegion translated by | |
46 // offset of each DxgiOutputDuplicator instance. | |
47 DesktopRegion updated_region_; | |
48 }; | |
49 | |
50 } // namespace webrtc | |
51 | |
52 #endif // MODULES_DESKTOP_CAPTURE_WIN_DXGI_CONTEXT_H_ | |
OLD | NEW |