blob: 1b918ad718cd335e748ab39d35a407ac6384fc92 [file] [log] [blame]
[email protected]aa0759e02014-04-04 19:13:401// 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.
4
[email protected]90533fc2014-04-16 18:23:595#ifndef UI_DISPLAY_UTIL_DISPLAY_UTIL_H_
6#define UI_DISPLAY_UTIL_DISPLAY_UTIL_H_
[email protected]aa0759e02014-04-04 19:13:407
avice85b4292015-12-24 21:08:258#include <stdint.h>
9
[email protected]90533fc2014-04-16 18:23:5910#include "ui/display/util/display_util_export.h"
[email protected]aa0759e02014-04-04 19:13:4011#include "ui/gfx/geometry/size.h"
12
kylechar79bed53c2016-09-01 13:02:3113namespace display {
[email protected]aa0759e02014-04-04 19:13:4014
15// Returns true if a given size is in the list of bogus sizes in mm that should
16// be ignored.
[email protected]90533fc2014-04-16 18:23:5917DISPLAY_UTIL_EXPORT bool IsDisplaySizeBlackListed(
18 const gfx::Size& physical_size);
[email protected]aa0759e02014-04-04 19:13:4019
[email protected]0e19df412014-04-10 05:07:3420// Returns the desired device scale factor for the display with the given
21// physical_size and resoultion.
[email protected]90533fc2014-04-16 18:23:5922DISPLAY_UTIL_EXPORT float GetScaleFactor(
[email protected]0e19df412014-04-10 05:07:3423 const gfx::Size& physical_size_in_mm,
24 const gfx::Size& screen_size_in_pixels);
25
robert.bradford3d88a672015-12-10 11:51:3826// Returns 64-bit persistent ID for the specified manufacturer's ID and
27// product_code_hash, and the index of the output it is connected to.
28// |output_index| is used to distinguish the displays of the same type. For
29// example, swapping two identical display between two outputs will not be
30// treated as swap. The 'serial number' field in EDID isn't used here because
31// it is not guaranteed to have unique number and it may have the same fixed
32// value (like 0).
33DISPLAY_UTIL_EXPORT int64_t GenerateDisplayID(uint16_t manufacturer_id,
34 uint32_t product_code_hash,
35 uint8_t output_index);
36
kylechar79bed53c2016-09-01 13:02:3137} // namespace display
[email protected]aa0759e02014-04-04 19:13:4038
[email protected]90533fc2014-04-16 18:23:5939#endif // UI_DISPLAY_UTIL_DISPLAY_UTIL_H_