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

Side by Side Diff: webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.h

Issue 2703123002: Skips the first frame in DxgiDuplicatorController (Closed)
Patch Set: Resolve review comments Created 3 years, 9 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
« no previous file with comments | « no previous file | webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // Returns desktop rect covered by this DxgiAdapterDuplicator. 63 // Returns desktop rect covered by this DxgiAdapterDuplicator.
64 DesktopRect desktop_rect() const { return desktop_rect_; } 64 DesktopRect desktop_rect() const { return desktop_rect_; }
65 65
66 // Returns the size of one screen owned by this DxgiAdapterDuplicator. |id| 66 // Returns the size of one screen owned by this DxgiAdapterDuplicator. |id|
67 // should be between [0, screen_count()). 67 // should be between [0, screen_count()).
68 DesktopRect ScreenRect(int id) const; 68 DesktopRect ScreenRect(int id) const;
69 69
70 // Returns the count of screens owned by this DxgiAdapterDuplicator. These 70 // Returns the count of screens owned by this DxgiAdapterDuplicator. These
71 // screens can be retrieved by an interger in the range of 71 // screens can be retrieved by an interger in the range of
72 // [0, screen_count()). 72 // [0, screen_count()).
73 int screen_count() const { return static_cast<int>(duplicators_.size()); } 73 int screen_count() const;
74
75 private:
76 friend class DxgiDuplicatorController;
77
78 bool DoInitialize();
79 74
80 void Setup(Context* context); 75 void Setup(Context* context);
81 76
82 void Unregister(const Context* const context); 77 void Unregister(const Context* const context);
83 78
79 // The minimum num_frames_captured() returned by |duplicators_|.
80 int64_t GetNumFramesCaptured() const;
81
82 private:
83 bool DoInitialize();
84
84 const D3dDevice device_; 85 const D3dDevice device_;
85 std::vector<DxgiOutputDuplicator> duplicators_; 86 std::vector<DxgiOutputDuplicator> duplicators_;
86 DesktopRect desktop_rect_; 87 DesktopRect desktop_rect_;
87 }; 88 };
88 89
89 } // namespace webrtc 90 } // namespace webrtc
90 91
91 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_ADAPTER_DUPLICATOR_H_ 92 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_ADAPTER_DUPLICATOR_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698