Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_output.h
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | 58 | { | |||
---|---|---|---|---|---|
59 | Q_OBJECT | 59 | Q_OBJECT | ||
60 | public: | 60 | public: | ||
61 | struct Edid { | 61 | struct Edid { | ||
62 | QByteArray eisaId; | 62 | QByteArray eisaId; | ||
63 | QByteArray monitorName; | 63 | QByteArray monitorName; | ||
64 | QByteArray serialNumber; | 64 | QByteArray serialNumber; | ||
65 | QSize physicalSize; | 65 | QSize physicalSize; | ||
66 | }; | 66 | }; | ||
67 | virtual ~DrmOutput(); | 67 | ///deletes the output, calling this whilst a page flip is pending will result in an error | ||
68 | ~DrmOutput() override; | ||||
69 | ///queues deleting the output after a page flip has completed. | ||||
70 | void teardown(); | ||||
68 | void releaseGbm(); | 71 | void releaseGbm(); | ||
69 | bool showCursor(DrmDumbBuffer *buffer); | 72 | bool showCursor(DrmDumbBuffer *buffer); | ||
70 | bool showCursor(); | 73 | bool showCursor(); | ||
71 | bool hideCursor(); | 74 | bool hideCursor(); | ||
72 | void updateCursor(); | 75 | void updateCursor(); | ||
73 | void moveCursor(const QPoint &globalPos); | 76 | void moveCursor(const QPoint &globalPos); | ||
74 | bool init(drmModeConnector *connector); | 77 | bool init(drmModeConnector *connector); | ||
75 | bool present(DrmBuffer *buffer); | 78 | bool present(DrmBuffer *buffer); | ||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | 141 | Q_SIGNALS: | |||
139 | void dpmsChanged(); | 142 | void dpmsChanged(); | ||
140 | void modeChanged(); | 143 | void modeChanged(); | ||
141 | 144 | | |||
142 | private: | 145 | private: | ||
143 | friend class DrmBackend; | 146 | friend class DrmBackend; | ||
144 | friend class DrmCrtc; // TODO: For use of setModeLegacy. Remove later when we allow multiple connectors per crtc | 147 | friend class DrmCrtc; // TODO: For use of setModeLegacy. Remove later when we allow multiple connectors per crtc | ||
145 | // and save the connector ids in the DrmCrtc instance. | 148 | // and save the connector ids in the DrmCrtc instance. | ||
146 | DrmOutput(DrmBackend *backend); | 149 | DrmOutput(DrmBackend *backend); | ||
150 | | ||||
147 | bool presentAtomically(DrmBuffer *buffer); | 151 | bool presentAtomically(DrmBuffer *buffer); | ||
148 | 152 | | |||
149 | enum class AtomicCommitMode { | 153 | enum class AtomicCommitMode { | ||
150 | Test, | 154 | Test, | ||
151 | Real | 155 | Real | ||
152 | }; | 156 | }; | ||
153 | bool doAtomicCommit(AtomicCommitMode mode); | 157 | bool doAtomicCommit(AtomicCommitMode mode); | ||
154 | 158 | | |||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | 208 | struct { | |||
207 | DrmPlane::Transformations planeTransformations; | 211 | DrmPlane::Transformations planeTransformations; | ||
208 | QPoint globalPos; | 212 | QPoint globalPos; | ||
209 | bool valid = false; | 213 | bool valid = false; | ||
210 | } m_lastWorkingState; | 214 | } m_lastWorkingState; | ||
211 | DrmDumbBuffer *m_cursor[2] = {nullptr, nullptr}; | 215 | DrmDumbBuffer *m_cursor[2] = {nullptr, nullptr}; | ||
212 | int m_cursorIndex = 0; | 216 | int m_cursorIndex = 0; | ||
213 | bool m_hasNewCursor = false; | 217 | bool m_hasNewCursor = false; | ||
214 | bool m_internal = false; | 218 | bool m_internal = false; | ||
219 | bool m_deleted = false; | ||||
215 | }; | 220 | }; | ||
216 | 221 | | |||
217 | } | 222 | } | ||
218 | 223 | | |||
219 | Q_DECLARE_METATYPE(KWin::DrmOutput*) | 224 | Q_DECLARE_METATYPE(KWin::DrmOutput*) | ||
220 | 225 | | |||
221 | #endif | 226 | #endif | ||
222 | 227 | |