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

Unified Diff: webrtc/modules/desktop_capture/desktop_geometry.cc

Issue 2099123002: [Chromoting] Improve DirectX capturer to support multiple outputs (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 5 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/desktop_geometry.cc
diff --git a/webrtc/modules/desktop_capture/desktop_geometry.cc b/webrtc/modules/desktop_capture/desktop_geometry.cc
index 1ff7c683c79828a0d8c4e5f9c4c4cb23fd365243..4c79688d35775160ba35dea9fdfb01743d95809b 100644
--- a/webrtc/modules/desktop_capture/desktop_geometry.cc
+++ b/webrtc/modules/desktop_capture/desktop_geometry.cc
@@ -37,6 +37,13 @@ void DesktopRect::IntersectWith(const DesktopRect& rect) {
}
}
+void DesktopRect::JoinWith(const DesktopRect& rect) {
+ left_ = std::min(left(), rect.left());
+ top_ = std::min(top(), rect.top());
+ right_ = std::max(right(), rect.right());
+ bottom_ = std::max(bottom(), rect.bottom());
+}
+
void DesktopRect::Translate(int32_t dx, int32_t dy) {
left_ += dx;
top_ += dy;

Powered by Google App Engine
This is Rietveld 408576698