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

Side by Side Diff: webrtc/modules/desktop_capture/win/dxgi_context.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
(Empty)
1 /*
2 * Copyright (c) 2017 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 WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_CONTEXT_H_
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_CONTEXT_H_
13
14 #include <vector>
15 #include "webrtc/modules/desktop_capture/desktop_region.h"
16
17 namespace webrtc {
18
19 struct OutputContext final {
20 // The updated region DxgiOutputDuplicator::DetectUpdatedRegion() output
21 // during last Duplicate() function call. It's always relative to the (0, 0).
22 DesktopRegion updated_region;
23 };
24
25 // An AdapterContext stores the status of a single DxgiFrame of
26 // DxgiAdapterDuplicator.
27 struct AdapterContext final {
28 AdapterContext();
29 AdapterContext(const AdapterContext& other);
30 ~AdapterContext();
31
32 // Child OutputContext belongs to this AdapterContext.
33 std::vector<OutputContext> contexts;
34 };
35
36 // A Context stores the status of a single DxgiFrame of
37 // DxgiDuplicatorController.
38 struct Context final {
Sergey Ulanov 2017/04/19 23:29:28 Thank you for moving these structs to this file. I
Hzj_jie 2017/04/20 01:07:28 Done. Indeed I think we have too many DXGI compone
39 public:
40 Context();
41 // Unregister this Context instance from DxgiDuplicatorController during
42 // destructing.
43 ~Context();
44
45 // Reset current Context, so it will be reinitialized next time.
46 void Reset();
47
48 // A Context will have an exactly same |controller_id| as
49 // DxgiDuplicatorController, to ensure it has been correctly setted up after
50 // each DxgiDuplicatorController::Initialize().
51 int controller_id = 0;
52
53 // Child AdapterContext belongs to this Context.
54 std::vector<AdapterContext> contexts;
55 };
56
57 } // namespace webrtc
58
59 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_CONTEXT_H_
OLDNEW
« 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