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 | bool supportsSwapBuffersWithDamage() const { | ||||
166 | return m_haveSwapBuffersWithDamage; | ||||
167 | } | ||||
168 | | ||||
162 | /** | 169 | /** | ||
163 | * @returns whether the context is surfaceless | 170 | * @returns whether the context is surfaceless | ||
164 | */ | 171 | */ | ||
165 | bool isSurfaceLessContext() const { | 172 | bool isSurfaceLessContext() const { | ||
166 | return m_surfaceLessContext; | 173 | return m_surfaceLessContext; | ||
167 | } | 174 | } | ||
168 | 175 | | |||
169 | /** | 176 | /** | ||
▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Line(s) | 207 | protected: | |||
243 | void setIsDirectRendering(bool direct) { | 250 | void setIsDirectRendering(bool direct) { | ||
244 | m_directRendering = direct; | 251 | m_directRendering = direct; | ||
245 | } | 252 | } | ||
246 | 253 | | |||
247 | void setSupportsBufferAge(bool value) { | 254 | void setSupportsBufferAge(bool value) { | ||
248 | m_haveBufferAge = value; | 255 | m_haveBufferAge = value; | ||
249 | } | 256 | } | ||
250 | 257 | | |||
258 | void setSupportsPartialUpdate(bool value) { | ||||
259 | m_havePartialUpdate = value; | ||||
260 | } | ||||
261 | | ||||
262 | void setSupportsSwapBuffersWithDamage(bool value) { | ||||
263 | m_haveSwapBuffersWithDamage = value; | ||||
264 | } | ||||
265 | | ||||
251 | /** | 266 | /** | ||
252 | * @return const QRegion& Damage of previously rendered frame | 267 | * @return const QRegion& Damage of previously rendered frame | ||
253 | */ | 268 | */ | ||
254 | const QRegion &lastDamage() const { | 269 | const QRegion &lastDamage() const { | ||
255 | return m_lastDamage; | 270 | return m_lastDamage; | ||
256 | } | 271 | } | ||
257 | void setLastDamage(const QRegion &damage) { | 272 | void setLastDamage(const QRegion &damage) { | ||
258 | m_lastDamage = damage; | 273 | m_lastDamage = damage; | ||
Show All 36 Lines | 300 | private: | |||
295 | * @brief Whether direct rendering is used, defaults to @c false. | 310 | * @brief Whether direct rendering is used, defaults to @c false. | ||
296 | */ | 311 | */ | ||
297 | bool m_directRendering; | 312 | bool m_directRendering; | ||
298 | /** | 313 | /** | ||
299 | * @brief Whether the backend supports GLX_EXT_buffer_age / EGL_EXT_buffer_age. | 314 | * @brief Whether the backend supports GLX_EXT_buffer_age / EGL_EXT_buffer_age. | ||
300 | */ | 315 | */ | ||
301 | bool m_haveBufferAge; | 316 | bool m_haveBufferAge; | ||
302 | /** | 317 | /** | ||
318 | * @brief Whether the backend supports EGL_KHR_partial_update | ||||
319 | */ | ||||
320 | 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… | |||||
321 | bool m_haveSwapBuffersWithDamage = false; | ||||
322 | /** | ||||
303 | * @brief Whether the initialization failed, of course default to @c false. | 323 | * @brief Whether the initialization failed, of course default to @c false. | ||
304 | */ | 324 | */ | ||
305 | bool m_failed; | 325 | bool m_failed; | ||
306 | /** | 326 | /** | ||
307 | * @brief Damaged region of previously rendered frame. | 327 | * @brief Damaged region of previously rendered frame. | ||
308 | */ | 328 | */ | ||
309 | QRegion m_lastDamage; | 329 | QRegion m_lastDamage; | ||
310 | /** | 330 | /** | ||
Show All 15 Lines |
Style: remove whitespace after &