[client] egl: revert "only copy damaged areas when using dmabuf"

This reverts commit a14de25661.
Frame is sometimes incorrect.
This commit is contained in:
Quantum
2021-07-18 04:42:48 -04:00
committed by Geoffrey McRae
parent a14de25661
commit c6a6230a56
7 changed files with 18 additions and 35 deletions

View File

@@ -388,8 +388,7 @@ bool egl_texture_update_from_frame(EGL_Texture * texture, const FrameBuffer * fr
return true;
}
bool egl_texture_update_from_dma(EGL_Texture * texture, const FrameBuffer * frame, const int dmaFd,
const FrameDamageRect * rects, int rectsCount)
bool egl_texture_update_from_dma(EGL_Texture * texture, const FrameBuffer * frame, const int dmaFd)
{
if (!texture->streaming)
return false;
@@ -471,15 +470,7 @@ bool egl_texture_update_from_dma(EGL_Texture * texture, const FrameBuffer * fram
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture->dmaTex, 0);
glBindTexture(GL_TEXTURE_2D, texture->tex[0]);
if (!texture->ready || rectsCount == 0)
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, texture->width, texture->height);
else
{
for (int i = 0; i < rectsCount; ++i)
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, rects[i].x, rects[i].y, rects[i].x, rects[i].y,
rects[i].width, rects[i].height);
}
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, texture->width, texture->height);
GLsync fence = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
glFlush();