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
3 // found in the LICENSE file.
5 #ifndef UI_DISPLAY_UTIL_EDID_PARSER_H_
6 #define UI_DISPLAY_UTIL_EDID_PARSER_H_
13 #include "ui/display/util/display_util_export.h"
19 // EDID (Extended Display Identification Data) is a format for monitor
20 // metadata. This provides a parser for the data.
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
26 // display id is successfully generated, or false otherwise.
27 DISPLAY_UTIL_EXPORT
bool GetDisplayIdFromEDID(const std::vector
<uint8_t>& edid
,
29 int64_t* display_id_out
,
30 int64_t* product_id_out
);
32 // Parses |edid| as EDID data and stores extracted data into |manufacturer_id|,
33 // |product_code|, |human_readable_name|, |active_pixel_out| and
34 // |physical_display_size_out|, then returns true. nullptr can be passed for
35 // unwanted output parameters. Some devices (especially internal displays) may
36 // not have the field for |human_readable_name|, and it will return true in
38 DISPLAY_UTIL_EXPORT
bool ParseOutputDeviceData(
39 const std::vector
<uint8_t>& edid
,
40 uint16_t* manufacturer_id
,
41 uint16_t* product_code
,
42 std::string
* human_readable_name
,
43 gfx::Size
* active_pixel_out
,
44 gfx::Size
* physical_display_size_out
);
46 DISPLAY_UTIL_EXPORT
bool ParseOutputOverscanFlag(
47 const std::vector
<uint8_t>& edid
,
52 #endif // UI_DISPLAY_UTIL_EDID_PARSER_H_