Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_output.h
Show All 40 Lines | |||||
41 | } | 41 | } | ||
42 | } | 42 | } | ||
43 | 43 | | |||
44 | namespace KWin | 44 | namespace KWin | ||
45 | { | 45 | { | ||
46 | 46 | | |||
47 | class DrmBackend; | 47 | class DrmBackend; | ||
48 | class DrmBuffer; | 48 | class DrmBuffer; | ||
49 | class DrmDumbBuffer; | ||||
49 | class DrmPlane; | 50 | class DrmPlane; | ||
50 | class DrmConnector; | 51 | class DrmConnector; | ||
51 | class DrmCrtc; | 52 | class DrmCrtc; | ||
52 | 53 | | |||
53 | class DrmOutput : public QObject | 54 | class DrmOutput : public QObject | ||
54 | { | 55 | { | ||
55 | Q_OBJECT | 56 | Q_OBJECT | ||
56 | public: | 57 | public: | ||
57 | struct Edid { | 58 | struct Edid { | ||
58 | QByteArray eisaId; | 59 | QByteArray eisaId; | ||
59 | QByteArray monitorName; | 60 | QByteArray monitorName; | ||
60 | QByteArray serialNumber; | 61 | QByteArray serialNumber; | ||
61 | QSize physicalSize; | 62 | QSize physicalSize; | ||
62 | }; | 63 | }; | ||
63 | virtual ~DrmOutput(); | 64 | virtual ~DrmOutput(); | ||
64 | void releaseGbm(); | 65 | void releaseGbm(); | ||
65 | void showCursor(DrmBuffer *buffer); | 66 | void showCursor(DrmDumbBuffer *buffer); | ||
66 | void hideCursor(); | 67 | void hideCursor(); | ||
67 | void moveCursor(const QPoint &globalPos); | 68 | void moveCursor(const QPoint &globalPos); | ||
68 | bool init(drmModeConnector *connector); | 69 | bool init(drmModeConnector *connector); | ||
69 | bool present(DrmBuffer *buffer); | 70 | bool present(DrmBuffer *buffer); | ||
70 | void pageFlipped(); | 71 | void pageFlipped(); | ||
71 | 72 | | |||
72 | /** | 73 | /** | ||
73 | * This sets the changes and tests them against the DRM output | 74 | * This sets the changes and tests them against the DRM output | ||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | 108 | private: | |||
124 | bool initCursorPlane(); | 125 | bool initCursorPlane(); | ||
125 | DrmObject::AtomicReturn atomicReqModesetPopulate(drmModeAtomicReq *req, bool enable); | 126 | DrmObject::AtomicReturn atomicReqModesetPopulate(drmModeAtomicReq *req, bool enable); | ||
126 | 127 | | |||
127 | DrmBackend *m_backend; | 128 | DrmBackend *m_backend; | ||
128 | DrmConnector *m_conn = nullptr; | 129 | DrmConnector *m_conn = nullptr; | ||
129 | DrmCrtc *m_crtc = nullptr; | 130 | DrmCrtc *m_crtc = nullptr; | ||
130 | QPoint m_globalPos; | 131 | QPoint m_globalPos; | ||
131 | qreal m_scale = 1; | 132 | qreal m_scale = 1; | ||
132 | quint32 m_lastStride = 0; | | |||
133 | bool m_lastGbm = false; | 133 | bool m_lastGbm = false; | ||
134 | drmModeModeInfo m_mode; | 134 | drmModeModeInfo m_mode; | ||
135 | Edid m_edid; | 135 | Edid m_edid; | ||
136 | QPointer<KWayland::Server::OutputInterface> m_waylandOutput; | 136 | QPointer<KWayland::Server::OutputInterface> m_waylandOutput; | ||
137 | QPointer<KWayland::Server::OutputDeviceInterface> m_waylandOutputDevice; | 137 | QPointer<KWayland::Server::OutputDeviceInterface> m_waylandOutputDevice; | ||
138 | QPointer<KWayland::Server::OutputChangeSet> m_changeset; | 138 | QPointer<KWayland::Server::OutputChangeSet> m_changeset; | ||
139 | KWin::ScopedDrmPointer<_drmModeProperty, &drmModeFreeProperty> m_dpms; | 139 | KWin::ScopedDrmPointer<_drmModeProperty, &drmModeFreeProperty> m_dpms; | ||
140 | DpmsMode m_dpmsMode = DpmsMode::On; | 140 | DpmsMode m_dpmsMode = DpmsMode::On; | ||
Show All 14 Lines |