Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_output.h
Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Line(s) | 47 | public: | |||
---|---|---|---|---|---|
82 | QByteArray uuid() const { | 82 | QByteArray uuid() const { | ||
83 | return m_uuid; | 83 | return m_uuid; | ||
84 | } | 84 | } | ||
85 | 85 | | |||
86 | bool initCursor(const QSize &cursorSize); | 86 | bool initCursor(const QSize &cursorSize); | ||
87 | 87 | | |||
88 | bool supportsTransformations() const; | 88 | bool supportsTransformations() const; | ||
89 | 89 | | |||
90 | int softwareRotationAngle() const override { | ||||
zzagUnsubmitted Done zzag: ```lang=cpp
int softwareRotationAngle() const {
return m_softwareRotationAngle;
}
``` | |||||
91 | return m_softwareRotationAngle; | ||||
92 | } | ||||
93 | | ||||
90 | Q_SIGNALS: | 94 | Q_SIGNALS: | ||
91 | void dpmsChanged(); | 95 | void dpmsChanged(); | ||
92 | 96 | | |||
93 | private: | 97 | private: | ||
94 | friend class DrmBackend; | 98 | friend class DrmBackend; | ||
95 | friend class DrmCrtc; // TODO: For use of setModeLegacy. Remove later when we allow multiple connectors per crtc | 99 | friend class DrmCrtc; // TODO: For use of setModeLegacy. Remove later when we allow multiple connectors per crtc | ||
96 | // and save the connector ids in the DrmCrtc instance. | 100 | // and save the connector ids in the DrmCrtc instance. | ||
97 | DrmOutput(DrmBackend *backend); | 101 | DrmOutput(DrmBackend *backend); | ||
Show All 26 Lines | |||||
124 | void setWaylandMode(); | 128 | void setWaylandMode(); | ||
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 getGammaRampSize() const override; | 133 | int getGammaRampSize() const override; | ||
130 | bool setGammaRamp(const ColorCorrect::GammaRamp &gamma) override; | 134 | bool setGammaRamp(const ColorCorrect::GammaRamp &gamma) override; | ||
131 | 135 | | |||
136 | int angleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b) const; | ||||
137 | | ||||
132 | DrmBackend *m_backend; | 138 | DrmBackend *m_backend; | ||
133 | DrmConnector *m_conn = nullptr; | 139 | DrmConnector *m_conn = nullptr; | ||
134 | DrmCrtc *m_crtc = nullptr; | 140 | DrmCrtc *m_crtc = nullptr; | ||
135 | bool m_lastGbm = false; | 141 | bool m_lastGbm = false; | ||
136 | drmModeModeInfo m_mode; | 142 | drmModeModeInfo m_mode; | ||
137 | Edid m_edid; | 143 | Edid m_edid; | ||
138 | DrmScopedPointer<drmModePropertyRes> m_dpms; | 144 | DrmScopedPointer<drmModePropertyRes> m_dpms; | ||
139 | DpmsMode m_dpmsMode = DpmsMode::On; | 145 | DpmsMode m_dpmsMode = DpmsMode::On; | ||
Show All 15 Lines | 157 | struct { | |||
155 | QPoint globalPos; | 161 | QPoint globalPos; | ||
156 | bool valid = false; | 162 | bool valid = false; | ||
157 | } m_lastWorkingState; | 163 | } m_lastWorkingState; | ||
158 | DrmDumbBuffer *m_cursor[2] = {nullptr, nullptr}; | 164 | DrmDumbBuffer *m_cursor[2] = {nullptr, nullptr}; | ||
159 | int m_cursorIndex = 0; | 165 | int m_cursorIndex = 0; | ||
160 | bool m_hasNewCursor = false; | 166 | bool m_hasNewCursor = false; | ||
161 | bool m_internal = false; | 167 | bool m_internal = 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 | |