mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-23 06:11:46 +00:00
[client] egl: perform full copy for framebuffer textures after resize
This prevents the code from using damage rectangles that are no longer on the screen, causing an out-of-bounds write.
This commit is contained in:
parent
230ce81eb8
commit
3b751a2017
1 changed files with 12 additions and 1 deletions
|
@ -68,6 +68,17 @@ void egl_texFBFree(EGL_Texture * texture)
|
|||
free(this);
|
||||
}
|
||||
|
||||
bool egl_texFBSetup(EGL_Texture * texture, const EGL_TexSetup * setup)
|
||||
{
|
||||
TextureBuffer * parent = UPCAST(TextureBuffer, texture);
|
||||
TexFB * this = UPCAST(TexFB , parent );
|
||||
|
||||
for (int i = 0; i < EGL_TEX_BUFFER_MAX; ++i)
|
||||
this->damage[i].count = -1;
|
||||
|
||||
return egl_texBufferStreamSetup(texture, setup);
|
||||
}
|
||||
|
||||
static bool egl_texFBUpdate(EGL_Texture * texture, const EGL_TexUpdate * update)
|
||||
{
|
||||
TextureBuffer * parent = UPCAST(TextureBuffer, texture);
|
||||
|
@ -134,7 +145,7 @@ EGL_TextureOps EGL_TextureFrameBuffer =
|
|||
{
|
||||
.init = egl_texFBInit,
|
||||
.free = egl_texFBFree,
|
||||
.setup = egl_texBufferStreamSetup,
|
||||
.setup = egl_texFBSetup,
|
||||
.update = egl_texFBUpdate,
|
||||
.process = egl_texBufferStreamProcess,
|
||||
.get = egl_texBufferStreamGet
|
||||
|
|
Loading…
Reference in a new issue