Index: webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc |
diff --git a/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc b/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc |
index fb8dacb720a34b55f051e999463c8f2091d27f5b..c02fc91fa276cff539392fdf1cfa73b1f0442bc0 100644 |
--- a/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc |
+++ b/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc |
@@ -67,7 +67,7 @@ DxgiOutputDuplicator::DxgiOutputDuplicator(const D3dDevice& device, |
desktop_rect_(RECTToDesktopRect(desc.DesktopCoordinates)) { |
RTC_DCHECK(output_); |
RTC_DCHECK(!desktop_rect_.is_empty()); |
- RTC_DCHECK(desktop_rect_.left() >= 0 && desktop_rect_.top() >= 0); |
+ RTC_DCHECK(desktop_rect_.width() > 0 && desktop_rect_.height() > 0); |
} |
DxgiOutputDuplicator::DxgiOutputDuplicator(DxgiOutputDuplicator&& other) = |
@@ -381,4 +381,9 @@ int64_t DxgiOutputDuplicator::num_frames_captured() const { |
return num_frames_captured_; |
} |
+void DxgiOutputDuplicator::TranslateRect(const DesktopVector& position) { |
+ desktop_rect_.Translate(position); |
+ RTC_DCHECK(desktop_rect_.left() >= 0 && desktop_rect_.top() >= 0); |
+} |
+ |
} // namespace webrtc |