| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/util/x11/edid_parser_x11.h" | 5 #include "ui/display/util/x11/edid_parser_x11.h" |
| 6 | 6 |
| 7 #include <X11/extensions/Xrandr.h> | 7 #include <X11/extensions/Xrandr.h> |
| 8 #include <X11/Xatom.h> | 8 #include <X11/Xatom.h> |
| 9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
| 10 | 10 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 } // namespace | 93 } // namespace |
| 94 | 94 |
| 95 bool GetDisplayId(XID output_id, | 95 bool GetDisplayId(XID output_id, |
| 96 uint8_t output_index, | 96 uint8_t output_index, |
| 97 int64_t* display_id_out) { | 97 int64_t* display_id_out) { |
| 98 std::vector<uint8_t> edid; | 98 std::vector<uint8_t> edid; |
| 99 if (!GetEDIDProperty(output_id, &edid)) | 99 if (!GetEDIDProperty(output_id, &edid)) |
| 100 return false; | 100 return false; |
| 101 | 101 |
| 102 bool result = GetDisplayIdFromEDID(edid, output_index, display_id_out); | 102 bool result = |
| 103 GetDisplayIdFromEDID(edid, output_index, display_id_out, nullptr); |
| 103 return result; | 104 return result; |
| 104 } | 105 } |
| 105 | 106 |
| 106 std::string GetDisplayName(RROutput output) { | 107 std::string GetDisplayName(RROutput output) { |
| 107 std::string display_name; | 108 std::string display_name; |
| 108 GetOutputDeviceData(output, nullptr, &display_name); | 109 GetOutputDeviceData(output, nullptr, &display_name); |
| 109 return display_name; | 110 return display_name; |
| 110 } | 111 } |
| 111 | 112 |
| 112 bool GetOutputOverscanFlag(RROutput output, bool* flag) { | 113 bool GetOutputOverscanFlag(RROutput output, bool* flag) { |
| 113 std::vector<uint8_t> edid; | 114 std::vector<uint8_t> edid; |
| 114 if (!GetEDIDProperty(output, &edid)) | 115 if (!GetEDIDProperty(output, &edid)) |
| 115 return false; | 116 return false; |
| 116 | 117 |
| 117 bool found = ParseOutputOverscanFlag(edid, flag); | 118 bool found = ParseOutputOverscanFlag(edid, flag); |
| 118 return found; | 119 return found; |
| 119 } | 120 } |
| 120 | 121 |
| 121 } // namespace ui | 122 } // namespace ui |
| OLD | NEW |