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

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

Issue 2495143002: DirectX capturer flickers on the second monitor (Closed)
Patch Set: Created 4 years, 1 month 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_output_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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 void Unregister(const Context* const context); 102 void Unregister(const Context* const context);
103 103
104 // Spreads changes from |context| to other registered Context(s) in 104 // Spreads changes from |context| to other registered Context(s) in
105 // contexts_. 105 // contexts_.
106 void SpreadContextChange(const Context* const context); 106 void SpreadContextChange(const Context* const context);
107 107
108 // Returns a DesktopRect in the coordinate of |texture_|->AsDesktopFrame(). 108 // Returns a DesktopRect in the coordinate of |texture_|->AsDesktopFrame().
109 DesktopRect SourceRect(DesktopRect rect); 109 DesktopRect SourceRect(DesktopRect rect);
110 110
111 // Returns a DesktopRect in the coordinate of |offset|.
112 DesktopRect TargetRect(DesktopRect rect, DesktopVector offset);
113
114 const D3dDevice device_; 111 const D3dDevice device_;
115 const Microsoft::WRL::ComPtr<IDXGIOutput1> output_; 112 const Microsoft::WRL::ComPtr<IDXGIOutput1> output_;
116 const DesktopRect desktop_rect_; 113 const DesktopRect desktop_rect_;
117 Microsoft::WRL::ComPtr<IDXGIOutputDuplication> duplication_; 114 Microsoft::WRL::ComPtr<IDXGIOutputDuplication> duplication_;
118 DXGI_OUTDUPL_DESC desc_; 115 DXGI_OUTDUPL_DESC desc_;
119 std::vector<uint8_t> metadata; 116 std::vector<uint8_t> metadata;
120 std::unique_ptr<DxgiTexture> texture_; 117 std::unique_ptr<DxgiTexture> texture_;
121 118
122 // After each AcquireNextFrame() function call, updated_region_(s) of all 119 // After each AcquireNextFrame() function call, updated_region_(s) of all
123 // active Context(s) need to be updated. Since they have missed the 120 // active Context(s) need to be updated. Since they have missed the
124 // change this time. And during next Duplicate() function call, their 121 // change this time. And during next Duplicate() function call, their
125 // updated_region_ will be merged and copied. 122 // updated_region_ will be merged and copied.
126 std::vector<Context*> contexts_; 123 std::vector<Context*> contexts_;
127 124
128 // The last full frame of this output and its offset. If on AcquireNextFrame() 125 // The last full frame of this output and its offset. If on AcquireNextFrame()
129 // failed because of timeout, i.e. no update, we can copy content from 126 // failed because of timeout, i.e. no update, we can copy content from
130 // |last_frame_|. 127 // |last_frame_|.
131 std::unique_ptr<SharedDesktopFrame> last_frame_; 128 std::unique_ptr<SharedDesktopFrame> last_frame_;
132 DesktopVector last_frame_offset_; 129 DesktopVector last_frame_offset_;
133 }; 130 };
134 131
135 } // namespace webrtc 132 } // namespace webrtc
136 133
137 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_OUTPUT_DUPLICATOR_H_ 134 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_DXGI_OUTPUT_DUPLICATOR_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698