OLD | NEW |
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 "chrome/browser/chromeos/login/helper.h" | 5 #include "chrome/browser/chromeos/login/helper.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 } | 106 } |
107 } | 107 } |
108 | 108 |
109 int GetCurrentUserImageSize() { | 109 int GetCurrentUserImageSize() { |
110 // The biggest size that the profile picture is displayed at is currently | 110 // The biggest size that the profile picture is displayed at is currently |
111 // 220px, used for the big preview on OOBE and Change Picture options page. | 111 // 220px, used for the big preview on OOBE and Change Picture options page. |
112 static const int kBaseUserImageSize = 220; | 112 static const int kBaseUserImageSize = 220; |
113 float scale_factor = gfx::Display::GetForcedDeviceScaleFactor(); | 113 float scale_factor = gfx::Display::GetForcedDeviceScaleFactor(); |
114 if (scale_factor > 1.0f) | 114 if (scale_factor > 1.0f) |
115 return static_cast<int>(scale_factor * kBaseUserImageSize); | 115 return static_cast<int>(scale_factor * kBaseUserImageSize); |
| 116 // Use maximum supported scale factor. |
116 return kBaseUserImageSize * | 117 return kBaseUserImageSize * |
117 ui::GetScaleFactorScale(ui::GetMaxScaleFactor()); | 118 ui::GetScaleFactorScale(ui::GetSupportedScaleFactors().back()); |
118 } | 119 } |
119 | 120 |
120 } // namespace chromeos | 121 } // namespace chromeos |
OLD | NEW |