[client] spice: initialize new surfaces to black

This commit is contained in:
Geoffrey McRae
2022-05-24 00:17:08 +10:00
parent b2221b114e
commit faae785c44
2 changed files with 13 additions and 0 deletions

View File

@@ -502,6 +502,18 @@ void egl_desktopSpiceConfigure(EGL_Desktop * desktop, int width, int height)
void egl_desktopSpiceDrawFill(EGL_Desktop * desktop, int x, int y, int width,
int height, uint32_t color)
{
/* this is a fairly hacky way to do this, but since it's only for the fallback
* spice display it's not really an issue */
uint32_t line[width];
for(int x = 0; x < width; ++x)
line[x] = color;
for(; y < height; ++y)
egl_textureUpdateRect(desktop->spiceTexture,
x, y, width, 1, sizeof(line), (uint8_t *)line, false);
atomic_store(&desktop->processFrame, true);
}
void egl_desktopSpiceDrawBitmap(EGL_Desktop * desktop, int x, int y, int width,