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_OZONE_PLATFORM_DRM_COMMON_DRM_UTIL_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_COMMON_DRM_UTIL_H_ |
6 #define UI_OZONE_PLATFORM_DRM_COMMON_DRM_UTIL_H_ | 6 #define UI_OZONE_PLATFORM_DRM_COMMON_DRM_UTIL_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
11 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" | |
11 #include "ui/ozone/platform/drm/common/scoped_drm_types.h" | 12 #include "ui/ozone/platform/drm/common/scoped_drm_types.h" |
12 | 13 |
13 typedef struct _drmModeModeInfo drmModeModeInfo; | 14 typedef struct _drmModeModeInfo drmModeModeInfo; |
14 | 15 |
15 namespace ui { | 16 namespace ui { |
16 | 17 |
17 // Representation of the information required to initialize and configure a | 18 // Representation of the information required to initialize and configure a |
18 // native display. | 19 // native display. |
19 class HardwareDisplayControllerInfo { | 20 class HardwareDisplayControllerInfo { |
20 public: | 21 public: |
(...skipping 11 matching lines...) Expand all Loading... | |
32 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayControllerInfo); | 33 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayControllerInfo); |
33 }; | 34 }; |
34 | 35 |
35 // Looks-up and parses the native display configurations returning all available | 36 // Looks-up and parses the native display configurations returning all available |
36 // displays. | 37 // displays. |
37 ScopedVector<HardwareDisplayControllerInfo> GetAvailableDisplayControllerInfos( | 38 ScopedVector<HardwareDisplayControllerInfo> GetAvailableDisplayControllerInfos( |
38 int fd); | 39 int fd); |
39 | 40 |
40 bool SameMode(const drmModeModeInfo& lhs, const drmModeModeInfo& rhs); | 41 bool SameMode(const drmModeModeInfo& lhs, const drmModeModeInfo& rhs); |
41 | 42 |
43 DisplayMode_Params CreateDisplayModeParams(const drmModeModeInfo& mode); | |
44 | |
45 // |info| provides the DRM information related to the display, |fd| is the | |
46 // connection to the DRM device and |index| provides a unique identifier for the | |
47 // display. |index| will be used to create the display id. | |
spang
2015/05/12 16:58:53
s/will be used/may be used... if no other identifi
dnicoara
2015/05/12 18:05:02
Added more details. It actually is used even if we
| |
48 DisplaySnapshot_Params CreateDisplaySnapshotParams( | |
49 HardwareDisplayControllerInfo* info, | |
50 int fd, | |
51 size_t index); | |
spang
2015/05/12 16:58:53
display_index
dnicoara
2015/05/12 18:05:02
Done.
| |
52 | |
42 } // namespace ui | 53 } // namespace ui |
43 | 54 |
44 #endif // UI_OZONE_PLATFORM_DRM_COMMON_DRM_UTIL_H_ | 55 #endif // UI_OZONE_PLATFORM_DRM_COMMON_DRM_UTIL_H_ |
OLD | NEW |