|
From: | Peter Lieven |
Subject: | Re: [Qemu-devel] [PATCH 14/15] vnc-tight: make the encoding palette static |
Date: | Tue, 28 Jun 2016 13:18:30 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 |
Am 28.06.2016 um 13:12 schrieb Paolo Bonzini:
On 28/06/2016 11:01, Peter Lieven wrote:@@ -201,6 +201,7 @@ typedef struct VncTight { #endif int levels[4]; z_stream stream[4]; + VncPalette palette; } VncTight;VncTight is copied back and forth in vnc_async_encoding_start and vnc_async_encoding_end, so this should not be included in VncTight. Perhaps however if you include a VncPalette* it allows reuse and avoids fragmentation? Or perhaps you can use a thread-local static variable?
I will have look. I missed the copying. However, this palette is only used to count the number of distinct colors. So it should only be used in the encoding thread. Peter
[Prev in Thread] | Current Thread | [Next in Thread] |