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

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

Issue 2845213002: DesktopRect::UnionWith() to extend current rect to cover the input rect (Closed)
Patch Set: Sync latest changes Created 3 years, 7 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 | « no previous file | webrtc/modules/desktop_capture/desktop_geometry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/desktop_capture/desktop_geometry.h
diff --git a/webrtc/modules/desktop_capture/desktop_geometry.h b/webrtc/modules/desktop_capture/desktop_geometry.h
index 8e9b9183a82e9f781840da14ae977ecd442ba09e..1e0deda8930eccb4c5cb9b0980b7aa82de962bbc 100644
--- a/webrtc/modules/desktop_capture/desktop_geometry.h
+++ b/webrtc/modules/desktop_capture/desktop_geometry.h
@@ -124,6 +124,10 @@ class DesktopRect {
// Finds intersection with |rect|.
void IntersectWith(const DesktopRect& rect);
+ // Extends the rectangle to cover |rect|. If |this| is empty, replaces |this|
+ // with |rect|; if |rect| is empty, this function takes no effect.
+ void UnionWith(const DesktopRect& rect);
+
// Adds (dx, dy) to the position of the rectangle.
void Translate(int32_t dx, int32_t dy);
void Translate(DesktopVector d) { Translate(d.x(), d.y()); };
« no previous file with comments | « no previous file | webrtc/modules/desktop_capture/desktop_geometry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698