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

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

Issue 1845113002: DirectX based screen capturer logic (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Remove width change in Texture::Capture Created 4 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 047eeec3d9c8fd89c13f29347a0a67b77b2096da..b9a912758e98418edb71589a8ebd2f51b121030b 100644
--- a/webrtc/modules/desktop_capture/desktop_geometry.h
+++ b/webrtc/modules/desktop_capture/desktop_geometry.h
@@ -105,6 +105,13 @@ class DesktopRect {
int32_t width() const { return right_ - left_; }
int32_t height() const { return bottom_ - top_; }
+ // Create a new DesktopRect instance to represent a rectangle which is
+ // |padding| pixels larger than current instance in each direction. This is
+ // for VideoEncoderVpx and ScreenCapturerWinDirectx.
Sergey Ulanov 2016/04/14 23:10:42 Don't need this sentence (it will expire quickly a
Hzj_jie 2016/04/15 19:42:17 Done.
+ // Note, left and top of the new instance won't be less than zero, and right
+ // and bottom wont't be larger than the desktop size.
Sergey Ulanov 2016/04/14 23:10:42 So it looks like this function currently does two
Hzj_jie 2016/04/15 19:42:17 Done.
+ DesktopRect Expand(uint32_t padding, const DesktopSize& size) const;
Sergey Ulanov 2016/04/14 23:10:42 Other functions in this class mutate the rect in-p
Sergey Ulanov 2016/04/14 23:10:42 nit: Move this function below, after other mutator
Sergey Ulanov 2016/04/14 23:10:42 padding should be int. From https://google.github.
Hzj_jie 2016/04/15 19:42:17 Considering this is a simple class, mutable eventu
Hzj_jie 2016/04/15 19:42:17 Done.
Hzj_jie 2016/04/15 19:42:17 Done.
+
DesktopVector top_left() const { return DesktopVector(left_, top_); }
DesktopSize size() const { return DesktopSize(width(), height()); }

Powered by Google App Engine
This is Rietveld 408576698