ui: avoid unnecessary memory operations in vnc_refresh_server_surface()
commit6c08964b415a7bfd3b3ed65e7309cc3ffdb096b8
authorWen, Jianxian <Jianxian.Wen@verisilicon.com>
Tue, 15 Mar 2022 06:50:37 +0000 (15 06:50 +0000)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 18 Mar 2022 08:30:01 +0000 (18 09:30 +0100)
tree30061ddfa61f1cc605d784b9b9537cffaf571d49
parent2297db8228cc0ee601a21b3e3f443ab6879f2a06
ui: avoid unnecessary memory operations in vnc_refresh_server_surface()

Check the dirty bits in advance to avoid unnecessary memory operations.
In the case that guest surface has different format than the server,
but it does not have dirty bits which means no refresh is actually needed,
the memory operations is not necessary.

Signed-off-by: Jianxian Wen <jianxian.wen@verisilicon.com>
Signed-off-by: Lu Gao <lu.gao@verisilicon.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <4C23C17B8E87E74E906A25A3254A03F4FA22100C@SHASXM06.verisilicon.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/vnc.c