Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: ui/display/util/display_util.h

Issue 1456623002: Add support for virtual displays (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use std::max as suggested by oshima@ Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/display/types/display_constants.h ('k') | ui/display/util/display_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_DISPLAY_UTIL_H_ 5 #ifndef UI_DISPLAY_UTIL_DISPLAY_UTIL_H_
6 #define UI_DISPLAY_UTIL_DISPLAY_UTIL_H_ 6 #define UI_DISPLAY_UTIL_DISPLAY_UTIL_H_
7 7
8 #include "ui/display/util/display_util_export.h" 8 #include "ui/display/util/display_util_export.h"
9 #include "ui/gfx/geometry/size.h" 9 #include "ui/gfx/geometry/size.h"
10 10
11 namespace ui { 11 namespace ui {
12 12
13 // Returns true if a given size is in the list of bogus sizes in mm that should 13 // Returns true if a given size is in the list of bogus sizes in mm that should
14 // be ignored. 14 // be ignored.
15 DISPLAY_UTIL_EXPORT bool IsDisplaySizeBlackListed( 15 DISPLAY_UTIL_EXPORT bool IsDisplaySizeBlackListed(
16 const gfx::Size& physical_size); 16 const gfx::Size& physical_size);
17 17
18 // Returns the desired device scale factor for the display with the given 18 // Returns the desired device scale factor for the display with the given
19 // physical_size and resoultion. 19 // physical_size and resoultion.
20 DISPLAY_UTIL_EXPORT float GetScaleFactor( 20 DISPLAY_UTIL_EXPORT float GetScaleFactor(
21 const gfx::Size& physical_size_in_mm, 21 const gfx::Size& physical_size_in_mm,
22 const gfx::Size& screen_size_in_pixels); 22 const gfx::Size& screen_size_in_pixels);
23 23
24 // Returns 64-bit persistent ID for the specified manufacturer's ID and
25 // product_code_hash, and the index of the output it is connected to.
26 // |output_index| is used to distinguish the displays of the same type. For
27 // example, swapping two identical display between two outputs will not be
28 // treated as swap. The 'serial number' field in EDID isn't used here because
29 // it is not guaranteed to have unique number and it may have the same fixed
30 // value (like 0).
31 DISPLAY_UTIL_EXPORT int64_t GenerateDisplayID(uint16_t manufacturer_id,
32 uint32_t product_code_hash,
33 uint8_t output_index);
34
24 } // namespace ui 35 } // namespace ui
25 36
26 #endif // UI_DISPLAY_UTIL_DISPLAY_UTIL_H_ 37 #endif // UI_DISPLAY_UTIL_DISPLAY_UTIL_H_
OLDNEW
« no previous file with comments | « ui/display/types/display_constants.h ('k') | ui/display/util/display_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698