OLD | NEW |
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 "chromeos/display/real_output_configurator_delegate.h" | 5 #include "chromeos/display/real_output_configurator_delegate.h" |
6 | 6 |
7 #include <X11/Xatom.h> | 7 #include <X11/Xatom.h> |
8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
9 #include <X11/extensions/dpms.h> | 9 #include <X11/extensions/dpms.h> |
10 #include <X11/extensions/XInput.h> | 10 #include <X11/extensions/XInput.h> |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 RROutput id, | 320 RROutput id, |
321 XRROutputInfo* info, | 321 XRROutputInfo* info, |
322 RRCrtc* last_used_crtc, | 322 RRCrtc* last_used_crtc, |
323 int index) { | 323 int index) { |
324 OutputConfigurator::OutputSnapshot output; | 324 OutputConfigurator::OutputSnapshot output; |
325 output.output = id; | 325 output.output = id; |
326 output.width_mm = info->mm_width; | 326 output.width_mm = info->mm_width; |
327 output.height_mm = info->mm_height; | 327 output.height_mm = info->mm_height; |
328 output.has_display_id = GetDisplayId(id, index, &output.display_id); | 328 output.has_display_id = GetDisplayId(id, index, &output.display_id); |
329 output.is_internal = IsInternalOutput(info); | 329 output.is_internal = IsInternalOutput(info); |
| 330 output.index = index; |
330 | 331 |
331 // Use the index as a valid display ID even if the internal | 332 // Use the index as a valid display ID even if the internal |
332 // display doesn't have valid EDID because the index | 333 // display doesn't have valid EDID because the index |
333 // will never change. | 334 // will never change. |
334 if (!output.has_display_id && output.is_internal) | 335 if (!output.has_display_id && output.is_internal) |
335 output.has_display_id = true; | 336 output.has_display_id = true; |
336 | 337 |
337 if (info->crtc) { | 338 if (info->crtc) { |
338 XRRCrtcInfo* crtc_info = XRRGetCrtcInfo(display_, screen_, info->crtc); | 339 XRRCrtcInfo* crtc_info = XRRGetCrtcInfo(display_, screen_, info->crtc); |
339 output.current_mode = crtc_info->mode; | 340 output.current_mode = crtc_info->mode; |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 << (*outputs)[i].touch_device_id << " to output #" << i; | 638 << (*outputs)[i].touch_device_id << " to output #" << i; |
638 break; | 639 break; |
639 } | 640 } |
640 } | 641 } |
641 } | 642 } |
642 | 643 |
643 XIFreeDeviceInfo(info); | 644 XIFreeDeviceInfo(info); |
644 } | 645 } |
645 | 646 |
646 } // namespace chromeos | 647 } // namespace chromeos |
OLD | NEW |