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

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

Issue 2848443004: Allow Windows to return a monitor out of the first quadrant (Closed)
Patch Set: Created 3 years, 8 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
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..d27d0f8c6d940c2b0603b19ccaf1d7e45316383d 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::Translate(int32_t dx, int32_t dy) {
+ desktop_rect_.Translate(dx, dy);
+ RTC_DCHECK(desktop_rect_.left() >= 0 && desktop_rect_.top() >= 0);
+}
+
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698