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