Index: webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc |
diff --git a/webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc b/webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc |
index 5947daf5dcccf8d8786e6d7c390721cbbc7468e8..caef1c2ca7b67c802b73040fd8f5337488187150 100644 |
--- a/webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc |
+++ b/webrtc/modules/desktop_capture/win/dxgi_adapter_duplicator.cc |
@@ -25,7 +25,8 @@ |
namespace { |
bool IsValidRect(const RECT& rect) { |
- return rect.right > rect.left && rect.bottom > rect.top; |
+ return rect.left >= 0 && rect.top >= 0 && rect.right > rect.left && |
+ rect.bottom > rect.top; |
} |
} // namespace |
@@ -152,12 +153,4 @@ |
return min; |
} |
-void DxgiAdapterDuplicator::TranslateRect(const DesktopVector& position) { |
- desktop_rect_.Translate(position); |
- RTC_DCHECK(desktop_rect_.left() >= 0 && desktop_rect_.top() >= 0); |
- for (auto& duplicator : duplicators_) { |
- duplicator.TranslateRect(position); |
- } |
-} |
- |
} // namespace webrtc |