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

Unified Diff: webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.cc

Issue 2845213002: DesktopRect::UnionWith() to extend current rect to cover the input rect (Closed)
Patch Set: Sync latest changes Created 3 years, 7 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
« no previous file with comments | « webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.cc
diff --git a/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.cc b/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.cc
index 576267bbfa6ce93d116de984a6d15b9faec93db1..c17bd1481c7fffa9e09939e3fbcb75f70deaee87 100644
--- a/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.cc
+++ b/webrtc/modules/desktop_capture/win/dxgi_duplicator_controller.cc
@@ -182,17 +182,7 @@ bool DxgiDuplicatorController::DoInitialize() {
d3d_info_.min_feature_level = feature_level;
}
- if (desktop_rect_.is_empty()) {
- desktop_rect_ = duplicators_.back().desktop_rect();
- } else {
- const DesktopRect& left = desktop_rect_;
- const DesktopRect& right = duplicators_.back().desktop_rect();
- desktop_rect_ =
- DesktopRect::MakeLTRB(std::min(left.left(), right.left()),
- std::min(left.top(), right.top()),
- std::max(left.right(), right.right()),
- std::max(left.bottom(), right.bottom()));
- }
+ desktop_rect_.UnionWith(duplicators_.back().desktop_rect());
}
TranslateRect();
« no previous file with comments | « webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698