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) {} |
86 | 87 |
87 Display::Display(const Display& other) = default; | 88 Display::Display(const Display& other) = default; |
88 | 89 |
89 Display::Display(int64_t id) | 90 Display::Display(int64_t id) |
90 : id_(id), | 91 : id_(id), |
91 device_scale_factor_(GetForcedDeviceScaleFactor()), | 92 device_scale_factor_(GetForcedDeviceScaleFactor()), |
92 rotation_(ROTATE_0), | 93 rotation_(ROTATE_0), |
93 touch_support_(TOUCH_SUPPORT_UNKNOWN), | 94 touch_support_(TOUCH_SUPPORT_UNKNOWN), |
94 color_depth_(DEFAULT_BITS_PER_PIXEL), | 95 color_depth_(DEFAULT_BITS_PER_PIXEL), |
95 depth_per_component_(DEFAULT_BITS_PER_COMPONENT) {} | 96 depth_per_component_(DEFAULT_BITS_PER_COMPONENT) {} |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 DCHECK_NE(kInvalidDisplayID, display_id); | 216 DCHECK_NE(kInvalidDisplayID, display_id); |
216 return HasInternalDisplay() && internal_display_id_ == display_id; | 217 return HasInternalDisplay() && internal_display_id_ == display_id; |
217 } | 218 } |
218 | 219 |
219 // static | 220 // static |
220 bool Display::HasInternalDisplay() { | 221 bool Display::HasInternalDisplay() { |
221 return internal_display_id_ != kInvalidDisplayID; | 222 return internal_display_id_ != kInvalidDisplayID; |
222 } | 223 } |
223 | 224 |
224 } // namespace display | 225 } // namespace display |
OLD | NEW |