Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_output.cpp
Show First 20 Lines • Show All 138 Lines • ▼ Show 20 Line(s) | 138 | case Qt::InvertedLandscapeOrientation: | |||
---|---|---|---|---|---|
139 | return 180; | 139 | return 180; | ||
140 | case Qt::PortraitOrientation: | 140 | case Qt::PortraitOrientation: | ||
141 | return 270; | 141 | return 270; | ||
142 | } | 142 | } | ||
143 | Q_UNREACHABLE(); | 143 | Q_UNREACHABLE(); | ||
144 | return 0; | 144 | return 0; | ||
145 | } | 145 | } | ||
146 | 146 | | |||
147 | QMatrix4x4 &&DrmOutput::matrixDisplay(const QSize &s) const | 147 | QMatrix4x4 DrmOutput::matrixDisplay(const QSize &s) const | ||
148 | { | 148 | { | ||
149 | QMatrix4x4 matrix; | 149 | QMatrix4x4 matrix; | ||
150 | const int angle = orientationToRotation(orientation()); | 150 | const int angle = orientationToRotation(orientation()); | ||
151 | if (angle) { | 151 | if (angle) { | ||
152 | const QSize center = s / 2; | 152 | const QSize center = s / 2; | ||
153 | 153 | | |||
154 | matrix.translate(center.width(), center.height()); | 154 | matrix.translate(center.width(), center.height()); | ||
155 | matrix.rotate(angle, 0, 0, 1); | 155 | matrix.rotate(angle, 0, 0, 1); | ||
156 | matrix.translate(-center.width(), -center.height()); | 156 | matrix.translate(-center.width(), -center.height()); | ||
157 | } | 157 | } | ||
158 | matrix.scale(scale()); | 158 | matrix.scale(scale()); | ||
159 | return std::move(matrix); | 159 | return matrix; | ||
160 | } | 160 | } | ||
161 | 161 | | |||
162 | void DrmOutput::updateCursor() | 162 | void DrmOutput::updateCursor() | ||
163 | { | 163 | { | ||
164 | QImage cursorImage = m_backend->softwareCursor(); | 164 | QImage cursorImage = m_backend->softwareCursor(); | ||
165 | if (cursorImage.isNull()) { | 165 | if (cursorImage.isNull()) { | ||
166 | return; | 166 | return; | ||
167 | } | 167 | } | ||
▲ Show 20 Lines • Show All 1047 Lines • Show Last 20 Lines |