| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chromeos/display/output_configurator.h" | 5 #include "chromeos/display/output_configurator.h" |
| 6 | 6 |
| 7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
| 8 #include <X11/extensions/Xrandr.h> | 8 #include <X11/extensions/Xrandr.h> |
| 9 #include <X11/extensions/XInput2.h> | 9 #include <X11/extensions/XInput2.h> |
| 10 | 10 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 return has_internal_output && (connected_output_count > 1); | 96 return has_internal_output && (connected_output_count > 1); |
| 97 } | 97 } |
| 98 | 98 |
| 99 } // namespace | 99 } // namespace |
| 100 | 100 |
| 101 OutputConfigurator::ModeInfo::ModeInfo() | 101 OutputConfigurator::ModeInfo::ModeInfo() |
| 102 : width(0), | 102 : width(0), |
| 103 height(0), | 103 height(0), |
| 104 interlaced(false) {} | 104 interlaced(false) {} |
| 105 | 105 |
| 106 OutputConfigurator::ModeInfo::ModeInfo(int width, int height, bool interlaced) |
| 107 : width(width), |
| 108 height(height), |
| 109 interlaced(interlaced) {} |
| 110 |
| 106 OutputConfigurator::CoordinateTransformation::CoordinateTransformation() | 111 OutputConfigurator::CoordinateTransformation::CoordinateTransformation() |
| 107 : x_scale(1.0), | 112 : x_scale(1.0), |
| 108 x_offset(0.0), | 113 x_offset(0.0), |
| 109 y_scale(1.0), | 114 y_scale(1.0), |
| 110 y_offset(0.0) {} | 115 y_offset(0.0) {} |
| 111 | 116 |
| 112 OutputConfigurator::OutputSnapshot::OutputSnapshot() | 117 OutputConfigurator::OutputSnapshot::OutputSnapshot() |
| 113 : output(None), | 118 : output(None), |
| 114 crtc(None), | 119 crtc(None), |
| 115 current_mode(None), | 120 current_mode(None), |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 float width_ratio = static_cast<float>(mirror_mode_info->width) / | 695 float width_ratio = static_cast<float>(mirror_mode_info->width) / |
| 691 static_cast<float>(native_mode_info->width); | 696 static_cast<float>(native_mode_info->width); |
| 692 float height_ratio = static_cast<float>(mirror_mode_info->height) / | 697 float height_ratio = static_cast<float>(mirror_mode_info->height) / |
| 693 static_cast<float>(native_mode_info->height); | 698 static_cast<float>(native_mode_info->height); |
| 694 | 699 |
| 695 area_ratio = width_ratio * height_ratio; | 700 area_ratio = width_ratio * height_ratio; |
| 696 return area_ratio; | 701 return area_ratio; |
| 697 } | 702 } |
| 698 | 703 |
| 699 } // namespace chromeos | 704 } // namespace chromeos |
| OLD | NEW |