Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_output.cpp
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Line(s) | 90 | { | |||
---|---|---|---|---|---|
91 | if (DrmBuffer *b = m_crtc->current()) { | 91 | if (DrmBuffer *b = m_crtc->current()) { | ||
92 | b->releaseGbm(); | 92 | b->releaseGbm(); | ||
93 | } | 93 | } | ||
94 | if (m_primaryPlane && m_primaryPlane->current()) { | 94 | if (m_primaryPlane && m_primaryPlane->current()) { | ||
95 | m_primaryPlane->current()->releaseGbm(); | 95 | m_primaryPlane->current()->releaseGbm(); | ||
96 | } | 96 | } | ||
97 | } | 97 | } | ||
98 | 98 | | |||
99 | void DrmOutput::hideCursor() | 99 | int DrmOutput::hideCursor() | ||
graesslin: the const here doesn't make sense | |||||
100 | { | 100 | { | ||
101 | drmModeSetCursor(m_backend->fd(), m_crtc->id(), 0, 0, 0); | 101 | return drmModeSetCursor(m_backend->fd(), m_crtc->id(), 0, 0, 0); | ||
102 | } | 102 | } | ||
103 | 103 | | |||
104 | void DrmOutput::showCursor(DrmDumbBuffer *c) | 104 | int DrmOutput::showCursor(DrmDumbBuffer *c) | ||
105 | { | 105 | { | ||
106 | const QSize &s = c->size(); | 106 | const QSize &s = c->size(); | ||
107 | drmModeSetCursor(m_backend->fd(), m_crtc->id(), c->handle(), s.width(), s.height()); | 107 | return drmModeSetCursor(m_backend->fd(), m_crtc->id(), c->handle(), s.width(), s.height()); | ||
108 | } | 108 | } | ||
109 | 109 | | |||
110 | void DrmOutput::showCursor() | 110 | int DrmOutput::showCursor() | ||
111 | { | 111 | { | ||
112 | showCursor(m_cursor[m_cursorIndex]); | 112 | int ret = showCursor(m_cursor[m_cursorIndex]); | ||
113 | if (!ret) { | ||||
114 | return ret; | ||||
115 | } | ||||
116 | | ||||
graesslin: const int or rather bool ;-) | |||||
113 | if (m_hasNewCursor) { | 117 | if (m_hasNewCursor) { | ||
114 | m_cursorIndex = (m_cursorIndex + 1) % 2; | 118 | m_cursorIndex = (m_cursorIndex + 1) % 2; | ||
115 | m_hasNewCursor = false; | 119 | m_hasNewCursor = false; | ||
116 | } | 120 | } | ||
121 | | ||||
122 | return 0; | ||||
117 | } | 123 | } | ||
118 | 124 | | |||
119 | void DrmOutput::updateCursor() | 125 | void DrmOutput::updateCursor() | ||
120 | { | 126 | { | ||
121 | QImage cursorImage = m_backend->softwareCursor(); | 127 | QImage cursorImage = m_backend->softwareCursor(); | ||
122 | if (cursorImage.isNull()) { | 128 | if (cursorImage.isNull()) { | ||
123 | return; | 129 | return; | ||
124 | } | 130 | } | ||
▲ Show 20 Lines • Show All 1174 Lines • Show Last 20 Lines |
the const here doesn't make sense