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

Side by Side Diff: webrtc/modules/desktop_capture/desktop_geometry.h

Issue 2202443002: [WebRTC] Add ScreenCapturerDifferWrapper to share Differ across ScreenCapturers (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Sync latest changes Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // Returns true if |rect| lies within the boundaries of this rectangle. 121 // Returns true if |rect| lies within the boundaries of this rectangle.
122 bool ContainsRect(const DesktopRect& rect) const; 122 bool ContainsRect(const DesktopRect& rect) const;
123 123
124 // Finds intersection with |rect|. 124 // Finds intersection with |rect|.
125 void IntersectWith(const DesktopRect& rect); 125 void IntersectWith(const DesktopRect& rect);
126 126
127 // Adds (dx, dy) to the position of the rectangle. 127 // Adds (dx, dy) to the position of the rectangle.
128 void Translate(int32_t dx, int32_t dy); 128 void Translate(int32_t dx, int32_t dy);
129 void Translate(DesktopVector d) { Translate(d.x(), d.y()); }; 129 void Translate(DesktopVector d) { Translate(d.x(), d.y()); };
130 130
131 // Enlarges current DesktopRect by subtracting |left_offset| and |top_offset|
132 // from |left_| and |top_|, and adding |right_offset| and |bottom_offset| to
133 // |right_| and |bottom_|. This function does not normalize the result, so
134 // |left_| and |top_| may be less than zero or larger than |right_| and
135 // |bottom_|.
136 void Extend(int32_t left_offset,
137 int32_t top_offset,
138 int32_t right_offset,
139 int32_t bottom_offset);
140
131 private: 141 private:
132 DesktopRect(int32_t left, int32_t top, int32_t right, int32_t bottom) 142 DesktopRect(int32_t left, int32_t top, int32_t right, int32_t bottom)
133 : left_(left), top_(top), right_(right), bottom_(bottom) { 143 : left_(left), top_(top), right_(right), bottom_(bottom) {
134 } 144 }
135 145
136 int32_t left_; 146 int32_t left_;
137 int32_t top_; 147 int32_t top_;
138 int32_t right_; 148 int32_t right_;
139 int32_t bottom_; 149 int32_t bottom_;
140 }; 150 };
141 151
142 } // namespace webrtc 152 } // namespace webrtc
143 153
144 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_GEOMETRY_H_ 154 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_GEOMETRY_H_
145 155
OLDNEW
« no previous file with comments | « webrtc/modules/desktop_capture/desktop_frame_generator.cc ('k') | webrtc/modules/desktop_capture/desktop_geometry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698