[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/4] vnc: destroy server surface if no client is
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH 4/4] vnc: destroy server surface if no client is connected |
Date: |
Thu, 03 Sep 2015 12:54:25 +0200 |
On Do, 2015-09-03 at 12:08 +0200, Peter Lieven wrote:
> Am 03.09.2015 um 11:57 schrieb Gerd Hoffmann:
> > On Do, 2015-08-27 at 12:18 +0200, Peter Lieven wrote:
> >> if no client is connected there is no need to keep the server
> >> surface. Throw it away and replace it with a dummy surface to
> >> save memory.
> > No dummy surface please. Just set vd->server = NULL.
>
> I can do that, but I have to check for vd->server == NULL at some points then.
Sure. That'll shortcut code paths which should not have any effect
anyway. You probably also want factor out server surface initialization
into a function which is called for both first vnc connect and surface
changes.
Oh, and btw: in case the surface changes without resolution/depth
changing (guest page flip) we might simply skip surface
(re-)initialization.
cheers,
Gerd