Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15, 6.2
-
None
Description
Raster-based clients running against a QtWayland compositor will normally reuse the same buffer for each frame (since the buffer is released immediately after texture upload). However, we always do a re-upload of the entire buffer (using glTexImage2D()), regardless of how much of the buffer is actually dirty.
To improve performance, we should do a partial texture upload of only the dirty region, using glTexSubImage2D(). This requires setting the stride with glPixelStorei(GL_UNPACK_ROW_LENGTH, stride). Note that that is not available in GLES 2, but we can still use glTexSubImage2D() to upload a sub-image with the same width as the buffer.