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

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: TranslateRect() should only be executed once 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
« no previous file with comments | « webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h ('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_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
« no previous file with comments | « webrtc/modules/desktop_capture/win/dxgi_output_duplicator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698