| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "ash/display/display_change_observer_chromeos.h" | 5 #include "ui/display/manager/chromeos/display_change_observer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <utility> | 11 #include <utility> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "ui/base/l10n/l10n_util.h" | 15 #include "ui/base/l10n/l10n_util.h" |
| 16 #include "ui/base/user_activity/user_activity_detector.h" | 16 #include "ui/base/user_activity/user_activity_detector.h" |
| 17 #include "ui/display/display.h" | 17 #include "ui/display/display.h" |
| 18 #include "ui/display/display_layout.h" | 18 #include "ui/display/display_layout.h" |
| 19 #include "ui/display/manager/chromeos/touchscreen_util.h" | 19 #include "ui/display/manager/chromeos/touchscreen_util.h" |
| 20 #include "ui/display/manager/display_layout_store.h" | 20 #include "ui/display/manager/display_layout_store.h" |
| 21 #include "ui/display/manager/display_manager.h" | 21 #include "ui/display/manager/display_manager.h" |
| 22 #include "ui/display/manager/display_manager_utilities.h" | 22 #include "ui/display/manager/display_manager_utilities.h" |
| 23 #include "ui/display/types/display_mode.h" | 23 #include "ui/display/types/display_mode.h" |
| 24 #include "ui/display/types/display_snapshot.h" | 24 #include "ui/display/types/display_snapshot.h" |
| 25 #include "ui/display/util/display_util.h" | 25 #include "ui/display/util/display_util.h" |
| 26 #include "ui/events/devices/input_device_manager.h" | 26 #include "ui/events/devices/input_device_manager.h" |
| 27 #include "ui/events/devices/touchscreen_device.h" | 27 #include "ui/events/devices/touchscreen_device.h" |
| 28 #include "ui/strings/grit/ui_strings.h" | 28 #include "ui/strings/grit/ui_strings.h" |
| 29 | 29 |
| 30 namespace ash { | 30 namespace display { |
| 31 | 31 |
| 32 using ui::DisplayConfigurator; | 32 using ui::DisplayConfigurator; |
| 33 | 33 |
| 34 namespace { | 34 namespace { |
| 35 | 35 |
| 36 // The DPI threshold to determine the device scale factor. | 36 // The DPI threshold to determine the device scale factor. |
| 37 // DPI higher than |dpi| will use |device_scale_factor|. | 37 // DPI higher than |dpi| will use |device_scale_factor|. |
| 38 struct DeviceScaleFactorDPIThreshold { | 38 struct DeviceScaleFactorDPIThreshold { |
| 39 float dpi; | 39 float dpi; |
| 40 float device_scale_factor; | 40 float device_scale_factor; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 53 const int kMinimumWidthFor4K = 3840; | 53 const int kMinimumWidthFor4K = 3840; |
| 54 | 54 |
| 55 // The list of device scale factors (in addition to 1.0f) which is | 55 // The list of device scale factors (in addition to 1.0f) which is |
| 56 // available in external large monitors. | 56 // available in external large monitors. |
| 57 const float kAdditionalDeviceScaleFactorsFor4k[] = {1.25f, 2.0f}; | 57 const float kAdditionalDeviceScaleFactorsFor4k[] = {1.25f, 2.0f}; |
| 58 | 58 |
| 59 void UpdateInternalDisplayId( | 59 void UpdateInternalDisplayId( |
| 60 const ui::DisplayConfigurator::DisplayStateList& display_states) { | 60 const ui::DisplayConfigurator::DisplayStateList& display_states) { |
| 61 for (auto* state : display_states) { | 61 for (auto* state : display_states) { |
| 62 if (state->type() == ui::DISPLAY_CONNECTION_TYPE_INTERNAL) { | 62 if (state->type() == ui::DISPLAY_CONNECTION_TYPE_INTERNAL) { |
| 63 if (display::Display::HasInternalDisplay()) | 63 if (Display::HasInternalDisplay()) |
| 64 DCHECK_EQ(display::Display::InternalDisplayId(), state->display_id()); | 64 DCHECK_EQ(Display::InternalDisplayId(), state->display_id()); |
| 65 display::Display::SetInternalDisplayId(state->display_id()); | 65 Display::SetInternalDisplayId(state->display_id()); |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 } | 68 } |
| 69 | 69 |
| 70 } // namespace | 70 } // namespace |
| 71 | 71 |
| 72 // static | 72 // static |
| 73 display::ManagedDisplayInfo::ManagedDisplayModeList | 73 ManagedDisplayInfo::ManagedDisplayModeList |
| 74 DisplayChangeObserver::GetInternalManagedDisplayModeList( | 74 DisplayChangeObserver::GetInternalManagedDisplayModeList( |
| 75 const display::ManagedDisplayInfo& display_info, | 75 const ManagedDisplayInfo& display_info, |
| 76 const ui::DisplaySnapshot& output) { | 76 const ui::DisplaySnapshot& output) { |
| 77 const ui::DisplayMode* ui_native_mode = output.native_mode(); | 77 const ui::DisplayMode* ui_native_mode = output.native_mode(); |
| 78 scoped_refptr<display::ManagedDisplayMode> native_mode = | 78 scoped_refptr<ManagedDisplayMode> native_mode = new ManagedDisplayMode( |
| 79 new display::ManagedDisplayMode(ui_native_mode->size(), | 79 ui_native_mode->size(), ui_native_mode->refresh_rate(), |
| 80 ui_native_mode->refresh_rate(), | 80 ui_native_mode->is_interlaced(), true, 1.0, |
| 81 ui_native_mode->is_interlaced(), true, | 81 display_info.device_scale_factor()); |
| 82 1.0, display_info.device_scale_factor()); | |
| 83 | 82 |
| 84 return display::CreateInternalManagedDisplayModeList(native_mode); | 83 return CreateInternalManagedDisplayModeList(native_mode); |
| 85 } | 84 } |
| 86 | 85 |
| 87 // static | 86 // static |
| 88 display::ManagedDisplayInfo::ManagedDisplayModeList | 87 ManagedDisplayInfo::ManagedDisplayModeList |
| 89 DisplayChangeObserver::GetExternalManagedDisplayModeList( | 88 DisplayChangeObserver::GetExternalManagedDisplayModeList( |
| 90 const ui::DisplaySnapshot& output) { | 89 const ui::DisplaySnapshot& output) { |
| 91 using DisplayModeMap = | 90 using DisplayModeMap = |
| 92 std::map<std::pair<int, int>, scoped_refptr<display::ManagedDisplayMode>>; | 91 std::map<std::pair<int, int>, scoped_refptr<ManagedDisplayMode>>; |
| 93 DisplayModeMap display_mode_map; | 92 DisplayModeMap display_mode_map; |
| 94 | 93 |
| 95 scoped_refptr<display::ManagedDisplayMode> native_mode = | 94 scoped_refptr<ManagedDisplayMode> native_mode = new ManagedDisplayMode(); |
| 96 new display::ManagedDisplayMode(); | |
| 97 for (const auto& mode_info : output.modes()) { | 95 for (const auto& mode_info : output.modes()) { |
| 98 const std::pair<int, int> size(mode_info->size().width(), | 96 const std::pair<int, int> size(mode_info->size().width(), |
| 99 mode_info->size().height()); | 97 mode_info->size().height()); |
| 100 scoped_refptr<display::ManagedDisplayMode> display_mode = | 98 scoped_refptr<ManagedDisplayMode> display_mode = new ManagedDisplayMode( |
| 101 new display::ManagedDisplayMode( | 99 mode_info->size(), mode_info->refresh_rate(), |
| 102 mode_info->size(), mode_info->refresh_rate(), | 100 mode_info->is_interlaced(), output.native_mode() == mode_info.get(), |
| 103 mode_info->is_interlaced(), output.native_mode() == mode_info.get(), | 101 1.0, 1.0); |
| 104 1.0, 1.0); | |
| 105 if (display_mode->native()) | 102 if (display_mode->native()) |
| 106 native_mode = display_mode; | 103 native_mode = display_mode; |
| 107 | 104 |
| 108 // Add the display mode if it isn't already present and override interlaced | 105 // Add the display mode if it isn't already present and override interlaced |
| 109 // display modes with non-interlaced ones. | 106 // display modes with non-interlaced ones. |
| 110 auto display_mode_it = display_mode_map.find(size); | 107 auto display_mode_it = display_mode_map.find(size); |
| 111 if (display_mode_it == display_mode_map.end()) | 108 if (display_mode_it == display_mode_map.end()) |
| 112 display_mode_map.insert(std::make_pair(size, display_mode)); | 109 display_mode_map.insert(std::make_pair(size, display_mode)); |
| 113 else if (display_mode_it->second->is_interlaced() && | 110 else if (display_mode_it->second->is_interlaced() && |
| 114 !display_mode->is_interlaced()) | 111 !display_mode->is_interlaced()) |
| 115 display_mode_it->second = std::move(display_mode); | 112 display_mode_it->second = std::move(display_mode); |
| 116 } | 113 } |
| 117 | 114 |
| 118 display::ManagedDisplayInfo::ManagedDisplayModeList display_mode_list; | 115 ManagedDisplayInfo::ManagedDisplayModeList display_mode_list; |
| 119 for (const auto& display_mode_pair : display_mode_map) | 116 for (const auto& display_mode_pair : display_mode_map) |
| 120 display_mode_list.push_back(std::move(display_mode_pair.second)); | 117 display_mode_list.push_back(std::move(display_mode_pair.second)); |
| 121 | 118 |
| 122 if (output.native_mode()) { | 119 if (output.native_mode()) { |
| 123 const std::pair<int, int> size(native_mode->size().width(), | 120 const std::pair<int, int> size(native_mode->size().width(), |
| 124 native_mode->size().height()); | 121 native_mode->size().height()); |
| 125 auto it = display_mode_map.find(size); | 122 auto it = display_mode_map.find(size); |
| 126 DCHECK(it != display_mode_map.end()) | 123 DCHECK(it != display_mode_map.end()) |
| 127 << "Native mode must be part of the mode list."; | 124 << "Native mode must be part of the mode list."; |
| 128 | 125 |
| 129 // If the native mode was replaced re-add it. | 126 // If the native mode was replaced re-add it. |
| 130 if (!it->second->native()) | 127 if (!it->second->native()) |
| 131 display_mode_list.push_back(native_mode); | 128 display_mode_list.push_back(native_mode); |
| 132 } | 129 } |
| 133 | 130 |
| 134 if (native_mode->size().width() >= kMinimumWidthFor4K) { | 131 if (native_mode->size().width() >= kMinimumWidthFor4K) { |
| 135 for (size_t i = 0; i < arraysize(kAdditionalDeviceScaleFactorsFor4k); ++i) { | 132 for (size_t i = 0; i < arraysize(kAdditionalDeviceScaleFactorsFor4k); ++i) { |
| 136 scoped_refptr<display::ManagedDisplayMode> mode = | 133 scoped_refptr<ManagedDisplayMode> mode = new ManagedDisplayMode( |
| 137 new display::ManagedDisplayMode( | 134 native_mode->size(), native_mode->refresh_rate(), |
| 138 native_mode->size(), native_mode->refresh_rate(), | 135 native_mode->is_interlaced(), false /* native */, |
| 139 native_mode->is_interlaced(), false /* native */, | 136 native_mode->ui_scale(), kAdditionalDeviceScaleFactorsFor4k[i]); |
| 140 native_mode->ui_scale(), kAdditionalDeviceScaleFactorsFor4k[i]); | |
| 141 display_mode_list.push_back(mode); | 137 display_mode_list.push_back(mode); |
| 142 } | 138 } |
| 143 } | 139 } |
| 144 | 140 |
| 145 return display_mode_list; | 141 return display_mode_list; |
| 146 } | 142 } |
| 147 | 143 |
| 148 DisplayChangeObserver::DisplayChangeObserver( | 144 DisplayChangeObserver::DisplayChangeObserver( |
| 149 ui::DisplayConfigurator* display_configurator, | 145 ui::DisplayConfigurator* display_configurator, |
| 150 display::DisplayManager* display_manager) | 146 display::DisplayManager* display_manager) |
| 151 : display_configurator_(display_configurator), | 147 : display_configurator_(display_configurator), |
| 152 display_manager_(display_manager) { | 148 display_manager_(display_manager) { |
| 153 ui::InputDeviceManager::GetInstance()->AddObserver(this); | 149 ui::InputDeviceManager::GetInstance()->AddObserver(this); |
| 154 } | 150 } |
| 155 | 151 |
| 156 DisplayChangeObserver::~DisplayChangeObserver() { | 152 DisplayChangeObserver::~DisplayChangeObserver() { |
| 157 ui::InputDeviceManager::GetInstance()->RemoveObserver(this); | 153 ui::InputDeviceManager::GetInstance()->RemoveObserver(this); |
| 158 } | 154 } |
| 159 | 155 |
| 160 ui::MultipleDisplayState DisplayChangeObserver::GetStateForDisplayIds( | 156 ui::MultipleDisplayState DisplayChangeObserver::GetStateForDisplayIds( |
| 161 const ui::DisplayConfigurator::DisplayStateList& display_states) const { | 157 const ui::DisplayConfigurator::DisplayStateList& display_states) const { |
| 162 UpdateInternalDisplayId(display_states); | 158 UpdateInternalDisplayId(display_states); |
| 163 if (display_states.size() == 1) | 159 if (display_states.size() == 1) |
| 164 return ui::MULTIPLE_DISPLAY_STATE_SINGLE; | 160 return ui::MULTIPLE_DISPLAY_STATE_SINGLE; |
| 165 display::DisplayIdList list = display::GenerateDisplayIdList( | 161 DisplayIdList list = |
| 166 display_states.begin(), display_states.end(), | 162 GenerateDisplayIdList(display_states.begin(), display_states.end(), |
| 167 [](const ui::DisplaySnapshot* display_state) { | 163 [](const ui::DisplaySnapshot* display_state) { |
| 168 return display_state->display_id(); | 164 return display_state->display_id(); |
| 169 }); | 165 }); |
| 170 | 166 |
| 171 const display::DisplayLayout& layout = | 167 const DisplayLayout& layout = |
| 172 display_manager_->layout_store()->GetRegisteredDisplayLayout(list); | 168 display_manager_->layout_store()->GetRegisteredDisplayLayout(list); |
| 173 return layout.mirrored ? ui::MULTIPLE_DISPLAY_STATE_DUAL_MIRROR | 169 return layout.mirrored ? ui::MULTIPLE_DISPLAY_STATE_DUAL_MIRROR |
| 174 : ui::MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED; | 170 : ui::MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED; |
| 175 } | 171 } |
| 176 | 172 |
| 177 bool DisplayChangeObserver::GetResolutionForDisplayId(int64_t display_id, | 173 bool DisplayChangeObserver::GetResolutionForDisplayId(int64_t display_id, |
| 178 gfx::Size* size) const { | 174 gfx::Size* size) const { |
| 179 scoped_refptr<display::ManagedDisplayMode> mode = | 175 scoped_refptr<ManagedDisplayMode> mode = |
| 180 display_manager_->GetSelectedModeForDisplayId(display_id); | 176 display_manager_->GetSelectedModeForDisplayId(display_id); |
| 181 if (!mode) | 177 if (!mode) |
| 182 return false; | 178 return false; |
| 183 *size = mode->size(); | 179 *size = mode->size(); |
| 184 return true; | 180 return true; |
| 185 } | 181 } |
| 186 | 182 |
| 187 void DisplayChangeObserver::OnDisplayModeChanged( | 183 void DisplayChangeObserver::OnDisplayModeChanged( |
| 188 const ui::DisplayConfigurator::DisplayStateList& display_states) { | 184 const ui::DisplayConfigurator::DisplayStateList& display_states) { |
| 189 UpdateInternalDisplayId(display_states); | 185 UpdateInternalDisplayId(display_states); |
| 190 | 186 |
| 191 std::vector<display::ManagedDisplayInfo> displays; | 187 std::vector<ManagedDisplayInfo> displays; |
| 192 std::set<int64_t> ids; | 188 std::set<int64_t> ids; |
| 193 for (const ui::DisplaySnapshot* state : display_states) { | 189 for (const ui::DisplaySnapshot* state : display_states) { |
| 194 const ui::DisplayMode* mode_info = state->current_mode(); | 190 const ui::DisplayMode* mode_info = state->current_mode(); |
| 195 if (!mode_info) | 191 if (!mode_info) |
| 196 continue; | 192 continue; |
| 197 | 193 |
| 198 float device_scale_factor = 1.0f; | 194 float device_scale_factor = 1.0f; |
| 199 // Sets dpi only if the screen size is not blacklisted. | 195 // Sets dpi only if the screen size is not blacklisted. |
| 200 float dpi = display::IsDisplaySizeBlackListed(state->physical_size()) | 196 float dpi = IsDisplaySizeBlackListed(state->physical_size()) |
| 201 ? 0 | 197 ? 0 |
| 202 : kInchInMm * mode_info->size().width() / | 198 : kInchInMm * mode_info->size().width() / |
| 203 state->physical_size().width(); | 199 state->physical_size().width(); |
| 204 if (state->type() == ui::DISPLAY_CONNECTION_TYPE_INTERNAL) { | 200 if (state->type() == ui::DISPLAY_CONNECTION_TYPE_INTERNAL) { |
| 205 if (dpi) | 201 if (dpi) |
| 206 device_scale_factor = FindDeviceScaleFactor(dpi); | 202 device_scale_factor = FindDeviceScaleFactor(dpi); |
| 207 } else { | 203 } else { |
| 208 scoped_refptr<display::ManagedDisplayMode> mode = | 204 scoped_refptr<ManagedDisplayMode> mode = |
| 209 display_manager_->GetSelectedModeForDisplayId(state->display_id()); | 205 display_manager_->GetSelectedModeForDisplayId(state->display_id()); |
| 210 if (mode) { | 206 if (mode) { |
| 211 device_scale_factor = mode->device_scale_factor(); | 207 device_scale_factor = mode->device_scale_factor(); |
| 212 } else { | 208 } else { |
| 213 // For monitors that are 40 inches and 4K or above, set | 209 // For monitors that are 40 inches and 4K or above, set |
| 214 // |device_scale_factor| to 2x. For margin purposes, 100 is subtracted | 210 // |device_scale_factor| to 2x. For margin purposes, 100 is subtracted |
| 215 // from the value of |k2xThreshouldSizeSquaredFor4KInMm| | 211 // from the value of |k2xThreshouldSizeSquaredFor4KInMm| |
| 216 const int k2xThreshouldSizeSquaredFor4KInMm = | 212 const int k2xThreshouldSizeSquaredFor4KInMm = |
| 217 (40 * 40 * kInchInMm * kInchInMm) - 100; | 213 (40 * 40 * kInchInMm * kInchInMm) - 100; |
| 218 gfx::Vector2d size_in_vec(state->physical_size().width(), | 214 gfx::Vector2d size_in_vec(state->physical_size().width(), |
| (...skipping 20 matching lines...) Expand all Loading... |
| 239 name = state->display_name(); | 235 name = state->display_name(); |
| 240 } | 236 } |
| 241 | 237 |
| 242 if (name.empty()) | 238 if (name.empty()) |
| 243 name = l10n_util::GetStringUTF8(IDS_DISPLAY_NAME_UNKNOWN); | 239 name = l10n_util::GetStringUTF8(IDS_DISPLAY_NAME_UNKNOWN); |
| 244 | 240 |
| 245 bool has_overscan = state->has_overscan(); | 241 bool has_overscan = state->has_overscan(); |
| 246 int64_t id = state->display_id(); | 242 int64_t id = state->display_id(); |
| 247 ids.insert(id); | 243 ids.insert(id); |
| 248 | 244 |
| 249 displays.push_back(display::ManagedDisplayInfo(id, name, has_overscan)); | 245 displays.push_back(ManagedDisplayInfo(id, name, has_overscan)); |
| 250 display::ManagedDisplayInfo& new_info = displays.back(); | 246 ManagedDisplayInfo& new_info = displays.back(); |
| 251 new_info.set_sys_path(state->sys_path()); | 247 new_info.set_sys_path(state->sys_path()); |
| 252 new_info.set_device_scale_factor(device_scale_factor); | 248 new_info.set_device_scale_factor(device_scale_factor); |
| 253 new_info.SetBounds(display_bounds); | 249 new_info.SetBounds(display_bounds); |
| 254 new_info.set_native(true); | 250 new_info.set_native(true); |
| 255 new_info.set_is_aspect_preserving_scaling( | 251 new_info.set_is_aspect_preserving_scaling( |
| 256 state->is_aspect_preserving_scaling()); | 252 state->is_aspect_preserving_scaling()); |
| 257 if (dpi) | 253 if (dpi) |
| 258 new_info.set_device_dpi(dpi); | 254 new_info.set_device_dpi(dpi); |
| 259 | 255 |
| 260 display::ManagedDisplayInfo::ManagedDisplayModeList display_modes = | 256 ManagedDisplayInfo::ManagedDisplayModeList display_modes = |
| 261 (state->type() == ui::DISPLAY_CONNECTION_TYPE_INTERNAL) | 257 (state->type() == ui::DISPLAY_CONNECTION_TYPE_INTERNAL) |
| 262 ? GetInternalManagedDisplayModeList(new_info, *state) | 258 ? GetInternalManagedDisplayModeList(new_info, *state) |
| 263 : GetExternalManagedDisplayModeList(*state); | 259 : GetExternalManagedDisplayModeList(*state); |
| 264 new_info.SetManagedDisplayModes(display_modes); | 260 new_info.SetManagedDisplayModes(display_modes); |
| 265 | 261 |
| 266 new_info.set_available_color_profiles( | 262 new_info.set_available_color_profiles( |
| 267 display_configurator_->GetAvailableColorCalibrationProfiles(id)); | 263 display_configurator_->GetAvailableColorCalibrationProfiles(id)); |
| 268 new_info.set_maximum_cursor_size(state->maximum_cursor_size()); | 264 new_info.set_maximum_cursor_size(state->maximum_cursor_size()); |
| 269 } | 265 } |
| 270 | 266 |
| 271 display::AssociateTouchscreens( | 267 AssociateTouchscreens( |
| 272 &displays, | 268 &displays, |
| 273 ui::InputDeviceManager::GetInstance()->GetTouchscreenDevices()); | 269 ui::InputDeviceManager::GetInstance()->GetTouchscreenDevices()); |
| 274 display_manager_->OnNativeDisplaysChanged(displays); | 270 display_manager_->OnNativeDisplaysChanged(displays); |
| 275 | 271 |
| 276 // For the purposes of user activity detection, ignore synthetic mouse events | 272 // For the purposes of user activity detection, ignore synthetic mouse events |
| 277 // that are triggered by screen resizes: http://crbug.com/360634 | 273 // that are triggered by screen resizes: http://crbug.com/360634 |
| 278 ui::UserActivityDetector* user_activity_detector = | 274 ui::UserActivityDetector* user_activity_detector = |
| 279 ui::UserActivityDetector::Get(); | 275 ui::UserActivityDetector::Get(); |
| 280 if (user_activity_detector) | 276 if (user_activity_detector) |
| 281 user_activity_detector->OnDisplayPowerChanging(); | 277 user_activity_detector->OnDisplayPowerChanging(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 297 | 293 |
| 298 // static | 294 // static |
| 299 float DisplayChangeObserver::FindDeviceScaleFactor(float dpi) { | 295 float DisplayChangeObserver::FindDeviceScaleFactor(float dpi) { |
| 300 for (size_t i = 0; i < arraysize(kThresholdTable); ++i) { | 296 for (size_t i = 0; i < arraysize(kThresholdTable); ++i) { |
| 301 if (dpi > kThresholdTable[i].dpi) | 297 if (dpi > kThresholdTable[i].dpi) |
| 302 return kThresholdTable[i].device_scale_factor; | 298 return kThresholdTable[i].device_scale_factor; |
| 303 } | 299 } |
| 304 return 1.0f; | 300 return 1.0f; |
| 305 } | 301 } |
| 306 | 302 |
| 307 } // namespace ash | 303 } // namespace display |
| OLD | NEW |