[Spice-commits] server/image-encoders.h

Frediano Ziglio fziglio at kemper.freedesktop.org
Mon Sep 26 09:28:29 UTC 2016


 server/image-encoders.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 435daaffdbbbfe306d2b3123b84fa7e7b83f4fa9
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Sat Aug 29 19:53:42 2015 +0100

    worker: RedCompressBuf optimization
    
    Move large buffer field at the end of structure.
    Due to the way machine address memory this usually can reduce code size
    and make program sligthly faster.
    Actually reduce size by 100 bytes.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Pavel Grunt <pgrunt at redhat.com>

diff --git a/server/image-encoders.h b/server/image-encoders.h
index 5bad0d4..6542edd 100644
--- a/server/image-encoders.h
+++ b/server/image-encoders.h
@@ -58,6 +58,8 @@ void glz_retention_detach_drawables(GlzImageRetention *ret);
 
 #define RED_COMPRESS_BUF_SIZE (1024 * 64)
 struct RedCompressBuf {
+    RedCompressBuf *send_next;
+
     /* This buffer provide space for compression algorithms.
      * Some algorithms access the buffer as an array of 32 bit words
      * so is defined to make sure is always aligned that way.
@@ -66,7 +68,6 @@ struct RedCompressBuf {
         uint8_t  bytes[RED_COMPRESS_BUF_SIZE];
         uint32_t words[RED_COMPRESS_BUF_SIZE / 4];
     } buf;
-    RedCompressBuf *send_next;
 };
 
 static inline void compress_buf_free(RedCompressBuf *buf)


More information about the Spice-commits mailing list