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

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: Resolve review comments 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/desktop_geometry.h
diff --git a/webrtc/modules/desktop_capture/desktop_geometry.h b/webrtc/modules/desktop_capture/desktop_geometry.h
index 8e9b9183a82e9f781840da14ae977ecd442ba09e..a14ad7832eacadd7189650fa790ce0ad47526af5 100644
--- a/webrtc/modules/desktop_capture/desktop_geometry.h
+++ b/webrtc/modules/desktop_capture/desktop_geometry.h
@@ -124,6 +124,11 @@ class DesktopRect {
// Finds intersection with |rect|.
void IntersectWith(const DesktopRect& rect);
+ // Finds the minimum area to cover both |this| and |rect|. If |this| is empty,
Sergey Ulanov 2017/05/16 19:53:00 It's not clear from this comment that the result i
Hzj_jie 2017/05/16 23:04:18 Done.
+ // 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') | webrtc/modules/desktop_capture/desktop_geometry.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698