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