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

Unified Diff: webrtc/modules/desktop_capture/win/dxgi_context.h

Issue 2099123002: [Chromoting] Improve DirectX capturer to support multiple outputs (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Resolve review comments Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
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..cc9afab697bff934ac9a7c2b2dd663df1f0b48fb
--- /dev/null
+++ b/webrtc/modules/desktop_capture/win/dxgi_context.h
@@ -0,0 +1,63 @@
+/*
+ * 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 {
+
+class DxgiOutputContext {
+ private:
+ friend class DxgiOutputDuplicator;
+
+ // The updated region DxgiOutputDuplicator::DetectUpdatedRegion() output
+ // during last Duplicate() function call. It's a DesktopRegion translated by
+ // offset of each DxgiOutputDuplicator instance.
+ DesktopRegion updated_region_;
+};
+
+class DxgiAdapterContext {
+ private:
+ friend class DxgiAdapterDuplicator;
+
+ // Child DxgiOutputContext belongs to this DxgiAdapterContext.
+ 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
+};
+
+// A context to store the status of a single consumer of
+// DxgiDuplicatorController. Consumers should create an instance of DxgiContext
+// and keep it through their lifetime, and send it as parameter to
+// DxgiDuplicatorController Duplicate() functions. For details, please refer to
+// comments of DxgiDuplicatorController.
+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.
+ public:
+ // Unregister this DxgiContext instance from all Dxgi duplicators during
+ // destructing.
+ ~DxgiContext();
+
+ private:
+ friend class DxgiDuplicatorController;
+
+ // A DxgiContext will have an exactly same |identity_| as
+ // DxgiDuplicatorController, to ensure it has been correctly setted up after
+ // each DxgiDuplicatorController::Initialize().
+ int identity_ = 0;
+
+ // Child DxgiAdapterContext belongs to this DxgiContext.
+ std::vector<DxgiAdapterContext> contexts_;
+};
+
+} // namespace webrtc
+
+#endif // MODULES_DESKTOP_CAPTURE_WIN_DXGI_CONTEXT_H_
« no previous file with comments | « webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc ('k') | webrtc/modules/desktop_capture/win/dxgi_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698