Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_output.h
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Line(s) | 48 | public: | |||
---|---|---|---|---|---|
78 | const DrmPlane *primaryPlane() const { | 78 | const DrmPlane *primaryPlane() const { | ||
79 | return m_primaryPlane; | 79 | return m_primaryPlane; | ||
80 | } | 80 | } | ||
81 | 81 | | |||
82 | bool initCursor(const QSize &cursorSize); | 82 | bool initCursor(const QSize &cursorSize); | ||
83 | 83 | | |||
84 | bool supportsTransformations() const; | 84 | bool supportsTransformations() const; | ||
85 | 85 | | |||
86 | int softwareRotationAngle() const override { | ||||
zzagUnsubmitted Done zzag: ```lang=cpp
int softwareRotationAngle() const {
return m_softwareRotationAngle;
}
``` | |||||
87 | return m_softwareRotationAngle; | ||||
88 | } | ||||
89 | | ||||
86 | private: | 90 | private: | ||
87 | friend class DrmBackend; | 91 | friend class DrmBackend; | ||
88 | friend class DrmCrtc; // TODO: For use of setModeLegacy. Remove later when we allow multiple connectors per crtc | 92 | friend class DrmCrtc; // TODO: For use of setModeLegacy. Remove later when we allow multiple connectors per crtc | ||
89 | // and save the connector ids in the DrmCrtc instance. | 93 | // and save the connector ids in the DrmCrtc instance. | ||
90 | DrmOutput(DrmBackend *backend); | 94 | DrmOutput(DrmBackend *backend); | ||
91 | 95 | | |||
92 | bool presentAtomically(DrmBuffer *buffer); | 96 | bool presentAtomically(DrmBuffer *buffer); | ||
93 | 97 | | |||
Show All 31 Lines | |||||
125 | 129 | | |||
126 | void transform(KWayland::Server::OutputDeviceInterface::Transform transform) override; | 130 | void transform(KWayland::Server::OutputDeviceInterface::Transform transform) override; | ||
127 | void automaticRotation(); | 131 | void automaticRotation(); | ||
128 | 132 | | |||
129 | int gammaRampSize() const override; | 133 | int gammaRampSize() const override; | ||
130 | bool setGammaRamp(const GammaRamp &gamma) override; | 134 | bool setGammaRamp(const GammaRamp &gamma) override; | ||
131 | QMatrix4x4 matrixDisplay(const QSize &s) const; | 135 | QMatrix4x4 matrixDisplay(const QSize &s) const; | ||
132 | 136 | | |||
137 | int angleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b) const; | ||||
138 | | ||||
133 | DrmBackend *m_backend; | 139 | DrmBackend *m_backend; | ||
134 | DrmConnector *m_conn = nullptr; | 140 | DrmConnector *m_conn = nullptr; | ||
135 | DrmCrtc *m_crtc = nullptr; | 141 | DrmCrtc *m_crtc = nullptr; | ||
136 | bool m_lastGbm = false; | 142 | bool m_lastGbm = false; | ||
137 | drmModeModeInfo m_mode; | 143 | drmModeModeInfo m_mode; | ||
138 | Edid m_edid; | 144 | Edid m_edid; | ||
139 | DrmScopedPointer<drmModePropertyRes> m_dpms; | 145 | DrmScopedPointer<drmModePropertyRes> m_dpms; | ||
140 | DpmsMode m_dpmsMode = DpmsMode::On; | 146 | DpmsMode m_dpmsMode = DpmsMode::On; | ||
Show All 14 Lines | 158 | struct { | |||
155 | DrmPlane::Transformations planeTransformations; | 161 | DrmPlane::Transformations planeTransformations; | ||
156 | QPoint globalPos; | 162 | QPoint globalPos; | ||
157 | bool valid = false; | 163 | bool valid = false; | ||
158 | } m_lastWorkingState; | 164 | } m_lastWorkingState; | ||
159 | DrmDumbBuffer *m_cursor[2] = {nullptr, nullptr}; | 165 | DrmDumbBuffer *m_cursor[2] = {nullptr, nullptr}; | ||
160 | int m_cursorIndex = 0; | 166 | int m_cursorIndex = 0; | ||
161 | bool m_hasNewCursor = false; | 167 | bool m_hasNewCursor = false; | ||
162 | bool m_deleted = false; | 168 | bool m_deleted = false; | ||
169 | int m_softwareRotationAngle = 0; | ||||
170 | Qt::ScreenOrientation m_preferredOrientation = Qt::LandscapeOrientation; | ||||
163 | }; | 171 | }; | ||
164 | 172 | | |||
165 | } | 173 | } | ||
166 | 174 | | |||
167 | Q_DECLARE_METATYPE(KWin::DrmOutput*) | 175 | Q_DECLARE_METATYPE(KWin::DrmOutput*) | ||
168 | 176 | | |||
169 | #endif | 177 | #endif | ||
170 | 178 | |