Index: webrtc/modules/desktop_capture/win/dxgi_context.h |
diff --git a/webrtc/modules/desktop_capture/win/dxgi_context.h b/webrtc/modules/desktop_capture/win/dxgi_context.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9f5375b52cc8362921e57cf12bcd3ab734aef44a |
--- /dev/null |
+++ b/webrtc/modules/desktop_capture/win/dxgi_context.h |
@@ -0,0 +1,38 @@ |
+/* |
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
+ * |
+ * Use of this source code is governed by a BSD-style license |
+ * that can be found in the LICENSE file in the root of the source |
+ * tree. An additional intellectual property rights grant can be found |
+ * in the file PATENTS. All contributing project authors may |
+ * be found in the AUTHORS file in the root of the source tree. |
+ */ |
+ |
+#ifndef MODULES_DESKTOP_CAPTURE_WIN_DXGI_CONTEXT_H_ |
+#define MODULES_DESKTOP_CAPTURE_WIN_DXGI_CONTEXT_H_ |
+ |
+#include <vector> |
+ |
+#include "webrtc/modules/desktop_capture/desktop_region.h" |
+ |
+namespace webrtc { |
+ |
+struct DxgiContext { |
Sergey Ulanov
2016/07/26 00:48:51
Add comment to explain how this class is used.
Hzj_jie
2016/07/26 02:13:01
Done.
|
+ private: |
+ friend class DxgiOutputDuplicator; |
+ friend class DxgiAdapterDuplicator; |
+ friend class DxgiDuplicatorContainer; |
Sergey Ulanov
2016/07/26 00:48:51
So here you have struct with all fields private an
Hzj_jie
2016/07/26 02:13:01
Done.
|
+ |
+ // The time this DxgiContext got initialized. DxgiDuplicationContainer uses |
+ // this time to decide whether current DxgiContext needs to be updated. |
+ int64_t initialize_time_nanos_ = 0; |
Sergey Ulanov
2016/07/26 00:48:51
remove _ suffix. It's used only for class fields,
Hzj_jie
2016/07/26 02:13:01
Changed into class.
|
+ |
+ // Child DxgiContext belongs to this DxgiContext. |
+ std::vector<DxgiContext> contexts_; |
Sergey Ulanov
2016/07/26 00:48:51
Why do you need a tree of contexts?
Hzj_jie
2016/07/26 02:13:01
One update_region_ is for one DxgiOutputDuplicator
|
+ |
+ DesktopRegion updated_region_; |
Sergey Ulanov
2016/07/26 00:48:51
Add comment to make it clear what's stored here.
Hzj_jie
2016/07/26 02:13:01
Done.
|
+}; |
+ |
+} // namespace webrtc |
+ |
+#endif // MODULES_DESKTOP_CAPTURE_WIN_DXGI_CONTEXT_H_ |