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

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

Issue 2944063002: exo: Fix cursor scaling for 1.25 DSF (Closed)
Patch Set: Restore DCHECK 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 | « ui/display/manager/managed_display_info.h ('k') | no next file » | 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 #include "ui/display/manager/managed_display_info.h" 5 #include "ui/display/manager/managed_display_info.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 color_profile_ = native_info.color_profile(); 386 color_profile_ = native_info.color_profile();
387 } 387 }
388 } 388 }
389 389
390 void ManagedDisplayInfo::SetBounds(const gfx::Rect& new_bounds_in_native) { 390 void ManagedDisplayInfo::SetBounds(const gfx::Rect& new_bounds_in_native) {
391 bounds_in_native_ = new_bounds_in_native; 391 bounds_in_native_ = new_bounds_in_native;
392 size_in_pixel_ = new_bounds_in_native.size(); 392 size_in_pixel_ = new_bounds_in_native.size();
393 UpdateDisplaySize(); 393 UpdateDisplaySize();
394 } 394 }
395 395
396 float ManagedDisplayInfo::GetDensityRatio() const {
397 if (Use125DSFForUIScaling() && device_scale_factor_ == 1.25f)
398 return 1.0f;
399 return device_scale_factor_;
400 }
401
396 float ManagedDisplayInfo::GetEffectiveDeviceScaleFactor() const { 402 float ManagedDisplayInfo::GetEffectiveDeviceScaleFactor() const {
397 if (Use125DSFForUIScaling() && device_scale_factor_ == 1.25f) 403 if (Use125DSFForUIScaling() && device_scale_factor_ == 1.25f)
398 return (configured_ui_scale_ == 0.8f) ? 1.25f : 1.0f; 404 return (configured_ui_scale_ == 0.8f) ? 1.25f : 1.0f;
399 if (device_scale_factor_ == configured_ui_scale_) 405 if (device_scale_factor_ == configured_ui_scale_)
400 return 1.0f; 406 return 1.0f;
401 return device_scale_factor_; 407 return device_scale_factor_;
402 } 408 }
403 409
404 float ManagedDisplayInfo::GetEffectiveUIScale() const { 410 float ManagedDisplayInfo::GetEffectiveUIScale() const {
405 if (Use125DSFForUIScaling() && device_scale_factor_ == 1.25f) 411 if (Use125DSFForUIScaling() && device_scale_factor_ == 1.25f)
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 synthesized_display_id = kSynthesizedDisplayIdStart; 525 synthesized_display_id = kSynthesizedDisplayIdStart;
520 } 526 }
521 527
522 void ManagedDisplayInfo::SetTouchCalibrationData( 528 void ManagedDisplayInfo::SetTouchCalibrationData(
523 const TouchCalibrationData& touch_calibration_data) { 529 const TouchCalibrationData& touch_calibration_data) {
524 has_touch_calibration_data_ = true; 530 has_touch_calibration_data_ = true;
525 touch_calibration_data_ = touch_calibration_data; 531 touch_calibration_data_ = touch_calibration_data;
526 } 532 }
527 533
528 } // namespace display 534 } // namespace display
OLDNEW
« no previous file with comments | « ui/display/manager/managed_display_info.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698