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(); |