Fix search results being clipped in app list.
[chromium-blink-merge.git] / ui / ozone / platform / drm / gpu / drm_util.h
bloba15a60f77fe3a63eed685197fcb1a9e1028624dc
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.
5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_UTIL_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_UTIL_H_
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"
14 typedef struct _drmModeModeInfo drmModeModeInfo;
16 namespace ui {
18 class DrmDevice;
19 class ScreenManager;
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();
29 drmModeConnector* connector() const { return connector_.get(); }
30 drmModeCrtc* crtc() const { return crtc_.get(); }
32 private:
33 ScopedDrmConnectorPtr connector_;
34 ScopedDrmCrtcPtr crtc_;
36 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayControllerInfo);
39 // Looks-up and parses the native display configurations returning all available
40 // displays.
41 ScopedVector<HardwareDisplayControllerInfo> GetAvailableDisplayControllerInfos(
42 int fd);
44 bool SameMode(const drmModeModeInfo& lhs, const drmModeModeInfo& rhs);
46 // Memory maps a DRM buffer.
47 bool MapDumbBuffer(int fd, uint32_t handle, uint32_t size, void** pixels);
49 void ForceInitializationOfPrimaryDisplay(const scoped_refptr<DrmDevice>& drm,
50 ScreenManager* screen_manager);
52 base::FilePath GetPrimaryDisplayCardPath();
54 } // namespace ui
56 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_UTIL_H_