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

Side by Side Diff: ash/display/display_manager.cc

Issue 1357423009: gfx: Make conversions from Size to SizeF be explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sizefconvert-gfx: . Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/display/display_manager.h" 5 #include "ash/display/display_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 1292
1293 gfx::Display DisplayManager::CreateMirroringDisplayFromDisplayInfoById( 1293 gfx::Display DisplayManager::CreateMirroringDisplayFromDisplayInfoById(
1294 int64 id, 1294 int64 id,
1295 const gfx::Point& origin, 1295 const gfx::Point& origin,
1296 float scale) { 1296 float scale) {
1297 DCHECK(display_info_.find(id) != display_info_.end()) << "id=" << id; 1297 DCHECK(display_info_.find(id) != display_info_.end()) << "id=" << id;
1298 const DisplayInfo& display_info = display_info_[id]; 1298 const DisplayInfo& display_info = display_info_[id];
1299 1299
1300 gfx::Display new_display(display_info.id()); 1300 gfx::Display new_display(display_info.id());
1301 new_display.SetScaleAndBounds( 1301 new_display.SetScaleAndBounds(
1302 1.0f, gfx::Rect(origin, gfx::ToFlooredSize(gfx::ScaleSize( 1302 1.0f, gfx::Rect(origin, gfx::ScaleToFlooredSize(
1303 display_info.size_in_pixel(), scale)))); 1303 display_info.size_in_pixel(), scale)));
1304 new_display.set_touch_support(display_info.touch_support()); 1304 new_display.set_touch_support(display_info.touch_support());
1305 return new_display; 1305 return new_display;
1306 } 1306 }
1307 1307
1308 bool DisplayManager::UpdateNonPrimaryDisplayBoundsForLayout( 1308 bool DisplayManager::UpdateNonPrimaryDisplayBoundsForLayout(
1309 DisplayList* displays, 1309 DisplayList* displays,
1310 std::vector<size_t>* updated_indices) const { 1310 std::vector<size_t>* updated_indices) const {
1311 1311
1312 if (displays->size() < 2U) 1312 if (displays->size() < 2U)
1313 return false; 1313 return false;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 gfx::Rect(new_secondary_origin, secondary_bounds.size())); 1410 gfx::Rect(new_secondary_origin, secondary_bounds.size()));
1411 secondary_display->UpdateWorkAreaFromInsets(insets); 1411 secondary_display->UpdateWorkAreaFromInsets(insets);
1412 } 1412 }
1413 1413
1414 void DisplayManager::RunPendingTasksForTest() { 1414 void DisplayManager::RunPendingTasksForTest() {
1415 if (!software_mirroring_display_list_.empty()) 1415 if (!software_mirroring_display_list_.empty())
1416 base::RunLoop().RunUntilIdle(); 1416 base::RunLoop().RunUntilIdle();
1417 } 1417 }
1418 1418
1419 } // namespace ash 1419 } // namespace ash
OLDNEW
« no previous file with comments | « ash/desktop_background/desktop_background_view.cc ('k') | ash/drag_drop/drag_drop_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698