OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_UTIL_H_ | |
6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_UTIL_H_ | |
7 | |
8 #include "base/files/file_path.h" | |
9 #include "base/macros.h" | |
10 #include "base/memory/ref_counted.h" | |
11 #include "base/memory/scoped_vector.h" | |
12 #include "ui/ozone/platform/drm/gpu/scoped_drm_types.h" | |
13 | |
14 typedef struct _drmModeModeInfo drmModeModeInfo; | |
15 | |
16 namespace ui { | |
17 | |
18 class DrmDevice; | |
19 class ScreenManager; | |
20 | |
21 // Representation of the information required to initialize and configure a | |
22 // native display. | |
23 class HardwareDisplayControllerInfo { | |
24 public: | |
25 HardwareDisplayControllerInfo(ScopedDrmConnectorPtr connector, | |
26 ScopedDrmCrtcPtr crtc); | |
27 ~HardwareDisplayControllerInfo(); | |
28 | |
29 drmModeConnector* connector() const { return connector_.get(); } | |
30 drmModeCrtc* crtc() const { return crtc_.get(); } | |
31 | |
32 private: | |
33 ScopedDrmConnectorPtr connector_; | |
34 ScopedDrmCrtcPtr crtc_; | |
35 | |
36 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayControllerInfo); | |
37 }; | |
38 | |
39 // Looks-up and parses the native display configurations returning all available | |
40 // displays. | |
41 ScopedVector<HardwareDisplayControllerInfo> GetAvailableDisplayControllerInfos( | |
42 int fd); | |
43 | |
44 bool SameMode(const drmModeModeInfo& lhs, const drmModeModeInfo& rhs); | |
45 | |
46 void ForceInitializationOfPrimaryDisplay(const scoped_refptr<DrmDevice>& drm, | |
47 ScreenManager* screen_manager); | |
48 | |
49 } // namespace ui | |
50 | |
51 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_UTIL_H_ | |
OLD | NEW |