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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 const gfx::Point& origin); | 70 const gfx::Point& origin); |
71 | 71 |
72 std::vector<DisplaySnapshot_Params> CreateParamsFromSnapshot( | 72 std::vector<DisplaySnapshot_Params> CreateParamsFromSnapshot( |
73 const MovableDisplaySnapshots& displays); | 73 const MovableDisplaySnapshots& displays); |
74 | 74 |
75 int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format); | 75 int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format); |
76 gfx::BufferFormat GetBufferFormatFromFourCCFormat(int format); | 76 gfx::BufferFormat GetBufferFormatFromFourCCFormat(int format); |
77 | 77 |
78 int GetFourCCFormatForOpaqueFramebuffer(gfx::BufferFormat format); | 78 int GetFourCCFormatForOpaqueFramebuffer(gfx::BufferFormat format); |
79 | 79 |
| 80 uint32_t GetGbmFlagsFromBufferUsage(gfx::BufferUsage usage); |
| 81 gfx::BufferUsage GetBufferUsageFromGbmFlags(int flags); |
| 82 |
80 gfx::Size GetMaximumCursorSize(int fd); | 83 gfx::Size GetMaximumCursorSize(int fd); |
81 | 84 |
82 DisplayMode_Params GetDisplayModeParams(const display::DisplayMode& mode); | 85 DisplayMode_Params GetDisplayModeParams(const display::DisplayMode& mode); |
83 | 86 |
84 std::unique_ptr<display::DisplayMode> CreateDisplayModeFromParams( | 87 std::unique_ptr<display::DisplayMode> CreateDisplayModeFromParams( |
85 const DisplayMode_Params& pmode); | 88 const DisplayMode_Params& pmode); |
86 | 89 |
87 bool MatchMode(const display::DisplayMode& display_mode, | 90 bool MatchMode(const display::DisplayMode& display_mode, |
88 const drmModeModeInfo& m); | 91 const drmModeModeInfo& m); |
89 | 92 |
90 const gfx::Size ModeSize(const drmModeModeInfo& mode); | 93 const gfx::Size ModeSize(const drmModeModeInfo& mode); |
91 | 94 |
92 float ModeRefreshRate(const drmModeModeInfo& mode); | 95 float ModeRefreshRate(const drmModeModeInfo& mode); |
93 | 96 |
94 bool ModeIsInterlaced(const drmModeModeInfo& mode); | 97 bool ModeIsInterlaced(const drmModeModeInfo& mode); |
95 | 98 |
96 MovableDisplaySnapshots CreateMovableDisplaySnapshotsFromParams( | 99 MovableDisplaySnapshots CreateMovableDisplaySnapshotsFromParams( |
97 const std::vector<DisplaySnapshot_Params>& displays); | 100 const std::vector<DisplaySnapshot_Params>& displays); |
98 | 101 |
99 } // namespace ui | 102 } // namespace ui |
100 | 103 |
101 #endif // UI_OZONE_PLATFORM_DRM_COMMON_DRM_UTIL_H_ | 104 #endif // UI_OZONE_PLATFORM_DRM_COMMON_DRM_UTIL_H_ |
OLD | NEW |