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 "ui/display/display.h" | 5 #include "ui/display/display.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 constexpr int DEFAULT_BITS_PER_PIXEL = 24; | 76 constexpr int DEFAULT_BITS_PER_PIXEL = 24; |
77 constexpr int DEFAULT_BITS_PER_COMPONENT = 8; | 77 constexpr int DEFAULT_BITS_PER_COMPONENT = 8; |
78 | 78 |
79 Display::Display() | 79 Display::Display() |
80 : id_(kInvalidDisplayID), | 80 : id_(kInvalidDisplayID), |
81 device_scale_factor_(GetForcedDeviceScaleFactor()), | 81 device_scale_factor_(GetForcedDeviceScaleFactor()), |
82 rotation_(ROTATE_0), | 82 rotation_(ROTATE_0), |
83 touch_support_(TOUCH_SUPPORT_UNKNOWN), | 83 touch_support_(TOUCH_SUPPORT_UNKNOWN), |
84 color_depth_(DEFAULT_BITS_PER_PIXEL), | 84 color_depth_(DEFAULT_BITS_PER_PIXEL), |
85 depth_per_component_(DEFAULT_BITS_PER_COMPONENT), | 85 depth_per_component_(DEFAULT_BITS_PER_COMPONENT) {} |
86 is_monochrome_(false) {} | |
87 | 86 |
88 Display::Display(const Display& other) = default; | 87 Display::Display(const Display& other) = default; |
89 | 88 |
90 Display::Display(int64_t id) | 89 Display::Display(int64_t id) |
91 : id_(id), | 90 : id_(id), |
92 device_scale_factor_(GetForcedDeviceScaleFactor()), | 91 device_scale_factor_(GetForcedDeviceScaleFactor()), |
93 rotation_(ROTATE_0), | 92 rotation_(ROTATE_0), |
94 touch_support_(TOUCH_SUPPORT_UNKNOWN), | 93 touch_support_(TOUCH_SUPPORT_UNKNOWN), |
95 color_depth_(DEFAULT_BITS_PER_PIXEL), | 94 color_depth_(DEFAULT_BITS_PER_PIXEL), |
96 depth_per_component_(DEFAULT_BITS_PER_COMPONENT) {} | 95 depth_per_component_(DEFAULT_BITS_PER_COMPONENT) {} |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 DCHECK_NE(kInvalidDisplayID, display_id); | 215 DCHECK_NE(kInvalidDisplayID, display_id); |
217 return HasInternalDisplay() && internal_display_id_ == display_id; | 216 return HasInternalDisplay() && internal_display_id_ == display_id; |
218 } | 217 } |
219 | 218 |
220 // static | 219 // static |
221 bool Display::HasInternalDisplay() { | 220 bool Display::HasInternalDisplay() { |
222 return internal_display_id_ != kInvalidDisplayID; | 221 return internal_display_id_ != kInvalidDisplayID; |
223 } | 222 } |
224 | 223 |
225 } // namespace display | 224 } // namespace display |
OLD | NEW |