OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <stdio.h> | 5 #include <stdio.h> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/display/display_info.h" | 9 #include "ash/display/display_info.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 rotation = gfx::Display::ROTATE_270; | 142 rotation = gfx::Display::ROTATE_270; |
143 break; | 143 break; |
144 } | 144 } |
145 } | 145 } |
146 } | 146 } |
147 } | 147 } |
148 | 148 |
149 float device_scale_factor = 1.0f; | 149 float device_scale_factor = 1.0f; |
150 if (!GetDisplayBounds(main_spec, &bounds_in_native, &device_scale_factor)) { | 150 if (!GetDisplayBounds(main_spec, &bounds_in_native, &device_scale_factor)) { |
151 #if defined(OS_WIN) | 151 #if defined(OS_WIN) |
152 if (gfx::IsHighDPIEnabled()) { | 152 device_scale_factor = gfx::GetDPIScale(); |
153 device_scale_factor = gfx::GetDPIScale(); | |
154 } | |
155 #endif | 153 #endif |
156 } | 154 } |
157 | 155 |
158 std::vector<DisplayMode> display_modes; | 156 std::vector<DisplayMode> display_modes; |
159 if (Tokenize(main_spec, "#", &parts) == 2) { | 157 if (Tokenize(main_spec, "#", &parts) == 2) { |
160 size_t native_mode = 0; | 158 size_t native_mode = 0; |
161 int largest_area = -1; | 159 int largest_area = -1; |
162 float highest_refresh_rate = -1.0f; | 160 float highest_refresh_rate = -1.0f; |
163 main_spec = parts[0]; | 161 main_spec = parts[0]; |
164 std::string resolution_list = parts[1]; | 162 std::string resolution_list = parts[1]; |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 } | 378 } |
381 | 379 |
382 bool DisplayInfo::IsColorProfileAvailable( | 380 bool DisplayInfo::IsColorProfileAvailable( |
383 ui::ColorCalibrationProfile profile) const { | 381 ui::ColorCalibrationProfile profile) const { |
384 return std::find(available_color_profiles_.begin(), | 382 return std::find(available_color_profiles_.begin(), |
385 available_color_profiles_.end(), | 383 available_color_profiles_.end(), |
386 profile) != available_color_profiles_.end(); | 384 profile) != available_color_profiles_.end(); |
387 } | 385 } |
388 | 386 |
389 } // namespace ash | 387 } // namespace ash |
OLD | NEW |