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

Side by Side Diff: ash/display/display_util.h

Issue 1263853002: Unified Desktop: Support 2xDSF display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months 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 | « ash/display/display_manager_unittest.cc ('k') | ash/display/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 ASH_DISPLAY_DISPLAY_UTIL_H_ 5 #ifndef ASH_DISPLAY_DISPLAY_UTIL_H_
6 #define ASH_DISPLAY_DISPLAY_UTIL_H_ 6 #define ASH_DISPLAY_DISPLAY_UTIL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <utility>
9 #include <vector> 10 #include <vector>
10 11
11 #include "ash/ash_export.h" 12 #include "ash/ash_export.h"
12 #include "ash/display/display_layout.h" 13 #include "ash/display/display_layout.h"
13 14
14 namespace gfx { 15 namespace gfx {
15 class Display; 16 class Display;
16 class Point; 17 class Point;
17 class Rect; 18 class Rect;
18 class Size; 19 class Size;
19 } 20 }
20 21
21 namespace ash { 22 namespace ash {
22 class AshWindowTreeHost; 23 class AshWindowTreeHost;
23 struct DisplayMode; 24 struct DisplayMode;
24 class DisplayInfo; 25 class DisplayInfo;
25 26
26 // Creates the display mode list for internal display 27 // Creates the display mode list for internal display
27 // based on |native_mode|. 28 // based on |native_mode|.
28 ASH_EXPORT std::vector<DisplayMode> CreateInternalDisplayModeList( 29 ASH_EXPORT std::vector<DisplayMode> CreateInternalDisplayModeList(
29 const DisplayMode& native_mode); 30 const DisplayMode& native_mode);
30 31
31 // Creates the display mode list for unified display 32 // Creates the display mode list for unified display
32 // based on |native_mode| and |scales|. 33 // based on |native_mode| and |scales|.
33 ASH_EXPORT std::vector<DisplayMode> CreateUnifiedDisplayModeList( 34 ASH_EXPORT std::vector<DisplayMode> CreateUnifiedDisplayModeList(
34 const DisplayMode& native_mode, 35 const DisplayMode& native_mode,
35 const std::set<float>& scales); 36 const std::set<std::pair<float, float>>& dsf_scale_list);
36 37
37 // Gets the display mode for |resolution|. Returns false if no display 38 // Gets the display mode for |resolution|. Returns false if no display
38 // mode matches the resolution, or the display is an internal display. 39 // mode matches the resolution, or the display is an internal display.
39 ASH_EXPORT bool GetDisplayModeForResolution(const DisplayInfo& info, 40 ASH_EXPORT bool GetDisplayModeForResolution(const DisplayInfo& info,
40 const gfx::Size& resolution, 41 const gfx::Size& resolution,
41 DisplayMode* out); 42 DisplayMode* out);
42 43
43 // Gets the display mode for the next valid UI scale. Returns false 44 // Gets the display mode for the next valid UI scale. Returns false
44 // if the display is not an internal display. 45 // if the display is not an internal display.
45 ASH_EXPORT bool GetDisplayModeForNextUIScale(const DisplayInfo& info, 46 ASH_EXPORT bool GetDisplayModeForNextUIScale(const DisplayInfo& info,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 83
83 // Returns the index in the displays whose bounds contains |point_in_screen|. 84 // Returns the index in the displays whose bounds contains |point_in_screen|.
84 // Returns -1 if no such display exist. 85 // Returns -1 if no such display exist.
85 ASH_EXPORT int FindDisplayIndexContainingPoint( 86 ASH_EXPORT int FindDisplayIndexContainingPoint(
86 const std::vector<gfx::Display>& displays, 87 const std::vector<gfx::Display>& displays,
87 const gfx::Point& point_in_screen); 88 const gfx::Point& point_in_screen);
88 89
89 } // namespace ash 90 } // namespace ash
90 91
91 #endif // ASH_DISPLAY_DISPLAY_UTIL_H_ 92 #endif // ASH_DISPLAY_DISPLAY_UTIL_H_
OLDNEW
« no previous file with comments | « ash/display/display_manager_unittest.cc ('k') | ash/display/display_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698