Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_output.h
Show First 20 Lines • Show All 126 Lines • ▼ Show 20 Line(s) | 126 | bool isInternal() const { | |||
---|---|---|---|---|---|
127 | return m_internal; | 127 | return m_internal; | ||
128 | } | 128 | } | ||
129 | 129 | | |||
130 | Qt::ScreenOrientation orientation() const { | 130 | Qt::ScreenOrientation orientation() const { | ||
131 | return m_orientation; | 131 | return m_orientation; | ||
132 | } | 132 | } | ||
133 | 133 | | |||
134 | Q_SIGNALS: | 134 | Q_SIGNALS: | ||
135 | void dpmsChanged(); | 135 | void dpmsChanged(); | ||
romangg: This gives me an compile error: invalid static_cast from type 'QObject*' to type 'KWayland… | |||||
Fixed. Also removed override in places where it didn't compile because of it. Kanedias: Fixed. Also removed `override` in places where it didn't compile because of it. | |||||
136 | void modeChanged(); | 136 | void modeChanged(); | ||
137 | 137 | | |||
138 | private: | 138 | private: | ||
139 | friend class RemoteAccessManager; | ||||
Is it only a friend class to access m_waylandOutput.data()? In this case better create a getter for it in DrmOutput. Or better do the passBuffer call in DrmBackend::present and give instead of the DrmOutput the KWayland::Server::OutputInterface from there to passBuffer. romangg: Is it only a friend class to access `m_waylandOutput.data()`? In this case better create a… | |||||
Regarding the "better" part: you would need the m_remoteaccessManager in DrmBackend. Only with EGL/GBM this would then be set. I.e. in QPainter DrmBackend would ignore it. But that's maybe a bit too much (also you would need to change the buffer cast in passBuffer). So better just add a getter in DrmOutput. romangg: Regarding the "better" part: you would need the `m_remoteaccessManager` in `DrmBackend`. Only… | |||||
139 | friend class DrmBackend; | 140 | friend class DrmBackend; | ||
140 | friend class DrmCrtc; // TODO: For use of setModeLegacy. Remove later when we allow multiple connectors per crtc | 141 | friend class DrmCrtc; // TODO: For use of setModeLegacy. Remove later when we allow multiple connectors per crtc | ||
141 | // and save the connector ids in the DrmCrtc instance. | 142 | // and save the connector ids in the DrmCrtc instance. | ||
142 | DrmOutput(DrmBackend *backend); | 143 | DrmOutput(DrmBackend *backend); | ||
143 | bool presentAtomically(DrmBuffer *buffer); | 144 | bool presentAtomically(DrmBuffer *buffer); | ||
144 | 145 | | |||
145 | enum class AtomicCommitMode { | 146 | enum class AtomicCommitMode { | ||
146 | Test, | 147 | Test, | ||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |
This gives me an compile error: invalid static_cast from type 'QObject*' to type 'KWayland::Server::OutputInterface*'
I assume you can just pass m_waylandOutput as QPointer and then access data() in passBuffer. This compiled for me.