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

Side by Side Diff: ui/ozone/platform/dri/dri_util.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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 | « ui/ozone/platform/dri/dri_surface_unittest.cc ('k') | ui/ozone/platform/dri/dri_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
(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_DRI_DRI_UTIL_H_
6 #define UI_OZONE_PLATFORM_DRI_DRI_UTIL_H_
7
8 #include "base/macros.h"
9 #include "base/memory/scoped_vector.h"
10 #include "ui/ozone/platform/dri/scoped_drm_types.h"
11
12 typedef struct _drmModeModeInfo drmModeModeInfo;
13
14 namespace ui {
15
16 // Representation of the information required to initialize and configure a
17 // native display.
18 class HardwareDisplayControllerInfo {
19 public:
20 HardwareDisplayControllerInfo(ScopedDrmConnectorPtr connector,
21 ScopedDrmCrtcPtr crtc);
22 ~HardwareDisplayControllerInfo();
23
24 drmModeConnector* connector() const { return connector_.get(); }
25 drmModeCrtc* crtc() const { return crtc_.get(); }
26
27 private:
28 ScopedDrmConnectorPtr connector_;
29 ScopedDrmCrtcPtr crtc_;
30
31 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayControllerInfo);
32 };
33
34 // Looks-up and parses the native display configurations returning all available
35 // displays.
36 ScopedVector<HardwareDisplayControllerInfo>
37 GetAvailableDisplayControllerInfos(int fd);
38
39 bool SameMode(const drmModeModeInfo& lhs, const drmModeModeInfo& rhs);
40
41 // Memory maps a DRM buffer.
42 bool MapDumbBuffer(int fd,
43 uint32_t handle,
44 uint32_t size,
45 void** pixels);
46
47 } // namespace ui
48
49 #endif // UI_OZONE_PLATFORM_DRI_DRI_UTIL_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/dri_surface_unittest.cc ('k') | ui/ozone/platform/dri/dri_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698