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

Side by Side Diff: ui/display/manager/managed_display_info.h

Issue 2965113002: [M60] exo: Fix cursor scaling for 1.25 DSF (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « components/exo/pointer.cc ('k') | ui/display/manager/managed_display_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 Display::Rotation GetActiveRotation() const; 225 Display::Rotation GetActiveRotation() const;
226 226
227 // Returns the source which set the active rotation for this display. 227 // Returns the source which set the active rotation for this display.
228 Display::RotationSource active_rotation_source() const { 228 Display::RotationSource active_rotation_source() const {
229 return active_rotation_source_; 229 return active_rotation_source_;
230 } 230 }
231 231
232 // Returns the rotation set by a given |source|. 232 // Returns the rotation set by a given |source|.
233 Display::Rotation GetRotation(Display::RotationSource source) const; 233 Display::Rotation GetRotation(Display::RotationSource source) const;
234 234
235 // Returns a measure of density relative to a display with 1.0 DSF. Unlike the
236 // effective DSF, this is independent from the UI scale.
237 float GetDensityRatio() const;
238
235 // Returns the ui scale and device scale factor actually used to create 239 // Returns the ui scale and device scale factor actually used to create
236 // display that chrome sees. This can be different from one obtained 240 // display that chrome sees. This can be different from one obtained
237 // from dispaly or one specified by a user in following situation. 241 // from dispaly or one specified by a user in following situation.
238 // 1) DSF is 2.0f and UI scale is 2.0f. (Returns 1.0f and 1.0f respectiely) 242 // 1) DSF is 2.0f and UI scale is 2.0f. (Returns 1.0f and 1.0f respectiely)
239 // 2) A user specified 0.8x on the device that has 1.25 DSF. 1.25 DSF device 243 // 2) A user specified 0.8x on the device that has 1.25 DSF. 1.25 DSF device
240 // uses 1.0f DFS unless 0.8x UI scaling is specified. 244 // uses 1.0f DFS unless 0.8x UI scaling is specified.
241 float GetEffectiveDeviceScaleFactor() const; 245 float GetEffectiveDeviceScaleFactor() const;
242 246
243 // Returns the ui scale used for the device scale factor. This 247 // Returns the ui scale used for the device scale factor. This
244 // return 1.0f if the ui scale and dsf are both set to 2.0. 248 // 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
399 // If you add a new member, you need to update Copy(). 403 // If you add a new member, you need to update Copy().
400 }; 404 };
401 405
402 // Resets the synthesized display id for testing. This 406 // Resets the synthesized display id for testing. This
403 // is necessary to avoid overflowing the output index. 407 // is necessary to avoid overflowing the output index.
404 void DISPLAY_MANAGER_EXPORT ResetDisplayIdForTest(); 408 void DISPLAY_MANAGER_EXPORT ResetDisplayIdForTest();
405 409
406 } // namespace display 410 } // namespace display
407 411
408 #endif // UI_DISPLAY_MANAGER_MANAGED_DISPLAY_INFO_H_ 412 #endif // UI_DISPLAY_MANAGER_MANAGED_DISPLAY_INFO_H_
OLDNEW
« no previous file with comments | « components/exo/pointer.cc ('k') | ui/display/manager/managed_display_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698