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


Reply via email to