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

Side by Side Diff: ui/ozone/platform/drm/common/drm_util.h

Issue 1285183008: Ozone integration. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add missing license header 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
OLDNEW
(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_COMMON_DRM_UTIL_H_
6 #define UI_OZONE_PLATFORM_DRM_COMMON_DRM_UTIL_H_
7
8 #include "base/files/file_path.h"
9 #include "base/macros.h"
10 #include "base/memory/scoped_vector.h"
11 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h"
12 #include "ui/ozone/platform/drm/common/scoped_drm_types.h"
13
14 typedef struct _drmModeModeInfo drmModeModeInfo;
15
16 namespace gfx {
17 class Point;
18 }
19
20 namespace ui {
21
22 // Representation of the information required to initialize and configure a
23 // native display.
24 class HardwareDisplayControllerInfo {
25 public:
26 HardwareDisplayControllerInfo(ScopedDrmConnectorPtr connector,
27 ScopedDrmCrtcPtr crtc);
28 ~HardwareDisplayControllerInfo();
29
30 drmModeConnector* connector() const { return connector_.get(); }
31 drmModeCrtc* crtc() const { return crtc_.get(); }
32
33 private:
34 ScopedDrmConnectorPtr connector_;
35 ScopedDrmCrtcPtr crtc_;
36
37 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayControllerInfo);
38 };
39
40 // Looks-up and parses the native display configurations returning all available
41 // displays.
42 ScopedVector<HardwareDisplayControllerInfo> GetAvailableDisplayControllerInfos(
43 int fd);
44
45 bool SameMode(const drmModeModeInfo& lhs, const drmModeModeInfo& rhs);
46
47 DisplayMode_Params CreateDisplayModeParams(const drmModeModeInfo& mode);
48
49 // |info| provides the DRM information related to the display, |fd| is the
50 // connection to the DRM device and |index| provides a unique identifier for the
51 // display. |index| will be used to generate the display id (it may be the id if
52 // the monitor's EDID lacks the necessary identifiers).
53 DisplaySnapshot_Params CreateDisplaySnapshotParams(
54 HardwareDisplayControllerInfo* info,
55 int fd,
56 size_t display_index,
57 const gfx::Point& origin);
58
59 } // namespace ui
60
61 #endif // UI_OZONE_PLATFORM_DRM_COMMON_DRM_UTIL_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/common/drm_gpu_test_helper_inprocess.cc ('k') | ui/ozone/platform/drm/common/drm_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698