mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
memory grows over time in wlfreerdp with /gfx:AVC44 fixed.
This commit is contained in:
@@ -46,22 +46,6 @@
|
||||
|
||||
#define TAG CLIENT_TAG("wayland")
|
||||
|
||||
static BOOL wl_begin_paint(rdpContext* context)
|
||||
{
|
||||
rdpGdi* gdi;
|
||||
|
||||
if (!context || !context->gdi)
|
||||
return FALSE;
|
||||
|
||||
gdi = context->gdi;
|
||||
|
||||
if (!gdi->primary)
|
||||
return FALSE;
|
||||
|
||||
gdi->primary->hdc->hwnd->invalid->null = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL wl_update_buffer(wlfContext* context_w, INT32 ix, INT32 iy, INT32 iw, INT32 ih)
|
||||
{
|
||||
BOOL res = FALSE;
|
||||
@@ -150,7 +134,13 @@ static BOOL wl_end_paint(rdpContext* context)
|
||||
w = gdi->primary->hdc->hwnd->invalid->w;
|
||||
h = gdi->primary->hdc->hwnd->invalid->h;
|
||||
context_w = (wlfContext*)context;
|
||||
return wl_update_buffer(context_w, x, y, w, h);
|
||||
if(!wl_update_buffer(context_w, x, y, w, h)){
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gdi->primary->hdc->hwnd->invalid->null = TRUE;
|
||||
gdi->primary->hdc->hwnd->ninvalid = 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL wl_refresh_display(wlfContext* context)
|
||||
@@ -271,7 +261,6 @@ static BOOL wl_post_connect(freerdp* instance)
|
||||
UwacWindowSetTitle(window, title);
|
||||
UwacWindowSetAppId(window, app_id);
|
||||
UwacWindowSetOpaqueRegion(context->window, 0, 0, w, h);
|
||||
instance->update->BeginPaint = wl_begin_paint;
|
||||
instance->update->EndPaint = wl_end_paint;
|
||||
instance->update->DesktopResize = wl_resize_display;
|
||||
freerdp_keyboard_init_ex(instance->context->settings->KeyboardLayout,
|
||||
|
||||
@@ -128,7 +128,8 @@ static void xdg_handle_toplevel_configure(void* data, struct xdg_toplevel* xdg_t
|
||||
event->window = window;
|
||||
event->states = surfaceState;
|
||||
|
||||
if (width && height)
|
||||
if ((width > 0 && height > 0) &&
|
||||
(width != window->width || height != window->height))
|
||||
{
|
||||
event->width = width;
|
||||
event->height = height;
|
||||
|
||||
Reference in New Issue
Block a user