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

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

Issue 2894523007: Use display::DisplayMode in ozone/drm/gpu (Closed)
Patch Set: review nits Created 3 years, 7 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/drm/BUILD.gn ('k') | ui/ozone/platform/drm/common/drm_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
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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "ui/display/types/display_mode.h"
15 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" 16 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h"
16 #include "ui/ozone/platform/drm/common/scoped_drm_types.h" 17 #include "ui/ozone/platform/drm/common/scoped_drm_types.h"
17 18
18 typedef struct _drmModeModeInfo drmModeModeInfo; 19 typedef struct _drmModeModeInfo drmModeModeInfo;
19 20
21 namespace display {
22 class DisplayMode;
23 } // namespace display
24
20 namespace gfx { 25 namespace gfx {
21 class Point; 26 class Point;
22 } 27 }
23 28
24 namespace ui { 29 namespace ui {
25 30
26 // Representation of the information required to initialize and configure a 31 // Representation of the information required to initialize and configure a
27 // native display. |index| is the position of the connection and will be 32 // native display. |index| is the position of the connection and will be
28 // used to generate a unique identifier for the display. 33 // used to generate a unique identifier for the display.
29 class HardwareDisplayControllerInfo { 34 class HardwareDisplayControllerInfo {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 size_t device_index, 68 size_t device_index,
64 const gfx::Point& origin); 69 const gfx::Point& origin);
65 70
66 int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format); 71 int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format);
67 gfx::BufferFormat GetBufferFormatFromFourCCFormat(int format); 72 gfx::BufferFormat GetBufferFormatFromFourCCFormat(int format);
68 73
69 int GetFourCCFormatForOpaqueFramebuffer(gfx::BufferFormat format); 74 int GetFourCCFormatForOpaqueFramebuffer(gfx::BufferFormat format);
70 75
71 gfx::Size GetMaximumCursorSize(int fd); 76 gfx::Size GetMaximumCursorSize(int fd);
72 77
78 DisplayMode_Params GetDisplayModeParams(const display::DisplayMode& mode);
79
80 std::unique_ptr<const display::DisplayMode> CreateDisplayModeFromParams(
81 const DisplayMode_Params& pmode);
82
83 bool MatchMode(const display::DisplayMode& display_mode,
84 const drmModeModeInfo& m);
85
86 const gfx::Size ModeSize(const drmModeModeInfo& mode);
87
88 float ModeRefreshRate(const drmModeModeInfo& mode);
89
90 bool ModeIsInterlaced(const drmModeModeInfo& mode);
91
73 } // namespace ui 92 } // namespace ui
74 93
75 #endif // UI_OZONE_PLATFORM_DRM_COMMON_DRM_UTIL_H_ 94 #endif // UI_OZONE_PLATFORM_DRM_COMMON_DRM_UTIL_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/BUILD.gn ('k') | ui/ozone/platform/drm/common/drm_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698