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

Unified Diff: ash/display/multi_display_manager.cc

Issue 11270042: Add non-member non-mutating methods for common gfx::Rect operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 2 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 | ash/launcher/launcher_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/multi_display_manager.cc
diff --git a/ash/display/multi_display_manager.cc b/ash/display/multi_display_manager.cc
index d93321b3e1f26549895bc0f222aa3048ed403eb4..5911ae92a06d1bf2cdbd1ec03632f510750ba221 100644
--- a/ash/display/multi_display_manager.cc
+++ b/ash/display/multi_display_manager.cc
@@ -360,8 +360,7 @@ const gfx::Display& MultiDisplayManager::GetDisplayMatching(
for (std::vector<gfx::Display>::const_iterator iter = displays_.begin();
iter != displays_.end(); ++iter) {
const gfx::Display& display = *iter;
- gfx::Rect intersect = display.bounds();
- intersect.Intersect(rect);
+ gfx::Rect intersect = gfx::IntersectRects(display.bounds(), rect);
int area = intersect.width() * intersect.height();
if (area > max) {
max = area;
« no previous file with comments | « no previous file | ash/launcher/launcher_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698