Refactor AbstractEglTexture
Open, Needs TriagePublic

Description

AbstractEglTexture has a lot of duplicated code to upload pixel data to the underlying OpenGL texture. We need to use GLTexture::update() method to update the texture. The problem is that GLTexture is not very flexible at the moment. Storage for the texture is allocated during construction of a GLTexture object, but we need to do that after the GLTexture object is constructed. The first step would be to refactor the GLTexture class so its API looks more closer to what QOpenGLTexture has.

After that, we can port the relevant parts of AbstractEglTexture class to the new API.

Because an EGL image cannot be attached to an immutable texture, we might have problems with clients that switch between wl_drm and wl_shm buffers. In that case, we need to destroy the underlying OpenGL texture and create a new one.

zzag created this task.Dec 3 2019, 10:45 AM
zzag updated the task description. (Show Details)Dec 3 2019, 11:00 AM
zzag updated the task description. (Show Details)Dec 3 2019, 11:20 AM