Changeset View
Changeset View
Standalone View
Standalone View
platformsupport/scenes/opengl/backend.h
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Line(s) | 54 | public: | |||
---|---|---|---|---|---|
74 | */ | 74 | */ | ||
75 | virtual QRegion prepareRenderingFrame() = 0; | 75 | virtual QRegion prepareRenderingFrame() = 0; | ||
76 | 76 | | |||
77 | /** | 77 | /** | ||
78 | * @brief Backend specific code to handle the end of rendering a frame. | 78 | * @brief Backend specific code to handle the end of rendering a frame. | ||
79 | * | 79 | * | ||
80 | * @param renderedRegion The possibly larger region that has been rendered | 80 | * @param renderedRegion The possibly larger region that has been rendered | ||
81 | * @param damagedRegion The damaged region that should be posted | 81 | * @param damagedRegion The damaged region that should be posted | ||
82 | */ | 82 | */ | ||
zzag: Style: remove whitespace after `&` | |||||
83 | virtual void endRenderingFrame(const QRegion &damage, const QRegion &damagedRegion) = 0; | 83 | virtual void endRenderingFrame(const QRegion &damage, const QRegion &damagedRegion) = 0; | ||
84 | virtual void endRenderingFrameForScreen(int screenId, const QRegion &damage, const QRegion &damagedRegion); | 84 | virtual void endRenderingFrameForScreen(int screenId, const QRegion &damage, const QRegion &damagedRegion); | ||
85 | virtual bool makeCurrent() = 0; | 85 | virtual bool makeCurrent() = 0; | ||
86 | virtual void doneCurrent() = 0; | 86 | virtual void doneCurrent() = 0; | ||
87 | virtual bool usesOverlayWindow() const = 0; | 87 | virtual bool usesOverlayWindow() const = 0; | ||
88 | /** | 88 | /** | ||
89 | * Whether the rendering needs to be split per screen. | 89 | * Whether the rendering needs to be split per screen. | ||
90 | * Default implementation returns @c false. | 90 | * Default implementation returns @c false. | ||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | |||||
154 | bool isDirectRendering() const { | 154 | bool isDirectRendering() const { | ||
155 | return m_directRendering; | 155 | return m_directRendering; | ||
156 | } | 156 | } | ||
157 | 157 | | |||
158 | bool supportsBufferAge() const { | 158 | bool supportsBufferAge() const { | ||
159 | return m_haveBufferAge; | 159 | return m_haveBufferAge; | ||
160 | } | 160 | } | ||
161 | 161 | | |||
162 | bool supportsPartialUpdate() const { | ||||
163 | return m_havePartialUpdate; | ||||
164 | } | ||||
165 | | ||||
162 | /** | 166 | /** | ||
163 | * @returns whether the context is surfaceless | 167 | * @returns whether the context is surfaceless | ||
164 | */ | 168 | */ | ||
165 | bool isSurfaceLessContext() const { | 169 | bool isSurfaceLessContext() const { | ||
166 | return m_surfaceLessContext; | 170 | return m_surfaceLessContext; | ||
167 | } | 171 | } | ||
168 | 172 | | |||
169 | /** | 173 | /** | ||
▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Line(s) | 204 | protected: | |||
243 | void setIsDirectRendering(bool direct) { | 247 | void setIsDirectRendering(bool direct) { | ||
244 | m_directRendering = direct; | 248 | m_directRendering = direct; | ||
245 | } | 249 | } | ||
246 | 250 | | |||
247 | void setSupportsBufferAge(bool value) { | 251 | void setSupportsBufferAge(bool value) { | ||
248 | m_haveBufferAge = value; | 252 | m_haveBufferAge = value; | ||
249 | } | 253 | } | ||
250 | 254 | | |||
255 | void setSupportsPartialUpdate(bool value) { | ||||
256 | m_havePartialUpdate = value; | ||||
257 | } | ||||
258 | | ||||
251 | /** | 259 | /** | ||
252 | * @return const QRegion& Damage of previously rendered frame | 260 | * @return const QRegion& Damage of previously rendered frame | ||
253 | */ | 261 | */ | ||
254 | const QRegion &lastDamage() const { | 262 | const QRegion &lastDamage() const { | ||
255 | return m_lastDamage; | 263 | return m_lastDamage; | ||
256 | } | 264 | } | ||
257 | void setLastDamage(const QRegion &damage) { | 265 | void setLastDamage(const QRegion &damage) { | ||
258 | m_lastDamage = damage; | 266 | m_lastDamage = damage; | ||
Show All 36 Lines | 293 | private: | |||
295 | * @brief Whether direct rendering is used, defaults to @c false. | 303 | * @brief Whether direct rendering is used, defaults to @c false. | ||
296 | */ | 304 | */ | ||
297 | bool m_directRendering; | 305 | bool m_directRendering; | ||
298 | /** | 306 | /** | ||
299 | * @brief Whether the backend supports GLX_EXT_buffer_age / EGL_EXT_buffer_age. | 307 | * @brief Whether the backend supports GLX_EXT_buffer_age / EGL_EXT_buffer_age. | ||
300 | */ | 308 | */ | ||
301 | bool m_haveBufferAge; | 309 | bool m_haveBufferAge; | ||
302 | /** | 310 | /** | ||
311 | * @brief Whether the backend supports EGL_KHR_partial_update | ||||
312 | */ | ||||
313 | bool m_havePartialUpdate; | ||||
nit while browsing this interesting patch: init this member with false too, otherwise this may be left uninitialized (e.g. if initBufferAge isn't called)? mwolff: nit while browsing this interesting patch:
init this member with false too, otherwise this may… | |||||
314 | /** | ||||
303 | * @brief Whether the initialization failed, of course default to @c false. | 315 | * @brief Whether the initialization failed, of course default to @c false. | ||
304 | */ | 316 | */ | ||
305 | bool m_failed; | 317 | bool m_failed; | ||
306 | /** | 318 | /** | ||
307 | * @brief Damaged region of previously rendered frame. | 319 | * @brief Damaged region of previously rendered frame. | ||
308 | */ | 320 | */ | ||
309 | QRegion m_lastDamage; | 321 | QRegion m_lastDamage; | ||
310 | /** | 322 | /** | ||
Show All 15 Lines |
Style: remove whitespace after &