| 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 #ifndef UI_DISPLAY_UTIL_EDID_PARSER_H_ | 5 #ifndef UI_DISPLAY_UTIL_EDID_PARSER_H_ |
| 6 #define UI_DISPLAY_UTIL_EDID_PARSER_H_ | 6 #define UI_DISPLAY_UTIL_EDID_PARSER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 // Generates the display id and product id for the pair of |edid| and |index|, | 24 // Generates the display id and product id for the pair of |edid| and |index|, |
| 25 // and store in |display_id_out| and |product_id_out|. Returns true if the | 25 // and store in |display_id_out| and |product_id_out|. Returns true if the |
| 26 // display id is successfully generated, or false otherwise. | 26 // display id is successfully generated, or false otherwise. |
| 27 DISPLAY_UTIL_EXPORT bool GetDisplayIdFromEDID(const std::vector<uint8_t>& edid, | 27 DISPLAY_UTIL_EXPORT bool GetDisplayIdFromEDID(const std::vector<uint8_t>& edid, |
| 28 uint8_t index, | 28 uint8_t index, |
| 29 int64_t* display_id_out, | 29 int64_t* display_id_out, |
| 30 int64_t* product_id_out); | 30 int64_t* product_id_out); |
| 31 | 31 |
| 32 // Parses |edid| as EDID data and stores extracted data into |manufacturer_id|, | 32 // Parses |edid| as EDID data and stores extracted data into |manufacturer_id|, |
| 33 // |human_readable_name|, |active_pixel_out| and |physical_display_size_out|, | 33 // |product_code|, |human_readable_name|, |active_pixel_out| and |
| 34 // then returns true. nullptr can be passed for unwanted output parameters. | 34 // |physical_display_size_out|, then returns true. nullptr can be passed for |
| 35 // Some devices (especially internal displays) may not have the field for | 35 // unwanted output parameters. Some devices (especially internal displays) may |
| 36 // |human_readable_name|, and it will return true in that case. | 36 // not have the field for |human_readable_name|, and it will return true in |
| 37 // that case. |
| 37 DISPLAY_UTIL_EXPORT bool ParseOutputDeviceData( | 38 DISPLAY_UTIL_EXPORT bool ParseOutputDeviceData( |
| 38 const std::vector<uint8_t>& edid, | 39 const std::vector<uint8_t>& edid, |
| 39 uint16_t* manufacturer_id, | 40 uint16_t* manufacturer_id, |
| 41 uint16_t* product_code, |
| 40 std::string* human_readable_name, | 42 std::string* human_readable_name, |
| 41 gfx::Size* active_pixel_out, | 43 gfx::Size* active_pixel_out, |
| 42 gfx::Size* physical_display_size_out); | 44 gfx::Size* physical_display_size_out); |
| 43 | 45 |
| 44 DISPLAY_UTIL_EXPORT bool ParseOutputOverscanFlag( | 46 DISPLAY_UTIL_EXPORT bool ParseOutputOverscanFlag( |
| 45 const std::vector<uint8_t>& edid, | 47 const std::vector<uint8_t>& edid, |
| 46 bool* flag); | 48 bool* flag); |
| 47 | 49 |
| 48 } // namespace ui | 50 } // namespace ui |
| 49 | 51 |
| 50 #endif // UI_DISPLAY_UTIL_EDID_PARSER_H_ | 52 #endif // UI_DISPLAY_UTIL_EDID_PARSER_H_ |
| OLD | NEW |