| 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 #ifndef UI_DISPLAY_MANAGER_MANAGED_DISPLAY_INFO_H_ | 5 #ifndef UI_DISPLAY_MANAGER_MANAGED_DISPLAY_INFO_H_ |
| 6 #define UI_DISPLAY_MANAGER_MANAGED_DISPLAY_INFO_H_ | 6 #define UI_DISPLAY_MANAGER_MANAGED_DISPLAY_INFO_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <array> | 10 #include <array> |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 Display::Rotation GetActiveRotation() const; | 220 Display::Rotation GetActiveRotation() const; |
| 221 | 221 |
| 222 // Returns the source which set the active rotation for this display. | 222 // Returns the source which set the active rotation for this display. |
| 223 Display::RotationSource active_rotation_source() const { | 223 Display::RotationSource active_rotation_source() const { |
| 224 return active_rotation_source_; | 224 return active_rotation_source_; |
| 225 } | 225 } |
| 226 | 226 |
| 227 // Returns the rotation set by a given |source|. | 227 // Returns the rotation set by a given |source|. |
| 228 Display::Rotation GetRotation(Display::RotationSource source) const; | 228 Display::Rotation GetRotation(Display::RotationSource source) const; |
| 229 | 229 |
| 230 // Returns a measure of density relative to a display with 1.0 DSF. Unlike the |
| 231 // effective DSF, this is independent from the UI scale. |
| 232 float GetDensityRatio() const; |
| 233 |
| 230 // Returns the ui scale and device scale factor actually used to create | 234 // Returns the ui scale and device scale factor actually used to create |
| 231 // display that chrome sees. This can be different from one obtained | 235 // display that chrome sees. This can be different from one obtained |
| 232 // from dispaly or one specified by a user in following situation. | 236 // from dispaly or one specified by a user in following situation. |
| 233 // 1) DSF is 2.0f and UI scale is 2.0f. (Returns 1.0f and 1.0f respectiely) | 237 // 1) DSF is 2.0f and UI scale is 2.0f. (Returns 1.0f and 1.0f respectiely) |
| 234 // 2) A user specified 0.8x on the device that has 1.25 DSF. 1.25 DSF device | 238 // 2) A user specified 0.8x on the device that has 1.25 DSF. 1.25 DSF device |
| 235 // uses 1.0f DFS unless 0.8x UI scaling is specified. | 239 // uses 1.0f DFS unless 0.8x UI scaling is specified. |
| 236 float GetEffectiveDeviceScaleFactor() const; | 240 float GetEffectiveDeviceScaleFactor() const; |
| 237 | 241 |
| 238 // Returns the ui scale used for the device scale factor. This | 242 // Returns the ui scale used for the device scale factor. This |
| 239 // return 1.0f if the ui scale and dsf are both set to 2.0. | 243 // return 1.0f if the ui scale and dsf are both set to 2.0. |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 // If you add a new member, you need to update Copy(). | 398 // If you add a new member, you need to update Copy(). |
| 395 }; | 399 }; |
| 396 | 400 |
| 397 // Resets the synthesized display id for testing. This | 401 // Resets the synthesized display id for testing. This |
| 398 // is necessary to avoid overflowing the output index. | 402 // is necessary to avoid overflowing the output index. |
| 399 void DISPLAY_MANAGER_EXPORT ResetDisplayIdForTest(); | 403 void DISPLAY_MANAGER_EXPORT ResetDisplayIdForTest(); |
| 400 | 404 |
| 401 } // namespace display | 405 } // namespace display |
| 402 | 406 |
| 403 #endif // UI_DISPLAY_MANAGER_MANAGED_DISPLAY_INFO_H_ | 407 #endif // UI_DISPLAY_MANAGER_MANAGED_DISPLAY_INFO_H_ |
| OLD | NEW |