[Spice-commits] server/dcc.cpp server/pixmap-cache.cpp server/pixmap-cache.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue May 18 08:33:48 UTC 2021


 server/dcc.cpp          |    2 --
 server/pixmap-cache.cpp |    1 -
 server/pixmap-cache.h   |    1 -
 3 files changed, 4 deletions(-)

New commits:
commit a5e0f86bc2122cacec489e4920a929efe102206f
Author: Frediano Ziglio <freddy77 at gmail.com>
Date:   Mon May 17 21:03:18 2021 +0100

    Removed only written "items" field from PixmapCache
    
    Signed-off-by: Frediano Ziglio <freddy77 at gmail.com>

diff --git a/server/dcc.cpp b/server/dcc.cpp
index 30afae59..e733ce48 100644
--- a/server/dcc.cpp
+++ b/server/dcc.cpp
@@ -804,13 +804,11 @@ bool dcc_pixmap_cache_unlocked_add(DisplayChannelClient *dcc, uint64_t id,
             now = &(*now)->next;
         }
         ring_remove(&tail->lru_link);
-        cache->items--;
         cache->available += tail->size;
         cache->sync[dcc->priv->id] = serial;
         dcc_push_release(dcc, SPICE_RES_TYPE_PIXMAP, tail->id, tail->sync);
         g_free(tail);
     }
-    ++cache->items;
     item->next = cache->hash_table[(key = BITS_CACHE_HASH_KEY(id))];
     cache->hash_table[key] = item;
     ring_item_init(&item->lru_link);
diff --git a/server/pixmap-cache.cpp b/server/pixmap-cache.cpp
index 03ea80f9..31423c19 100644
--- a/server/pixmap-cache.cpp
+++ b/server/pixmap-cache.cpp
@@ -52,7 +52,6 @@ void pixmap_cache_clear(PixmapCache *cache)
     memset(cache->hash_table, 0, sizeof(*cache->hash_table) * BITS_CACHE_HASH_SIZE);
 
     cache->available = cache->size;
-    cache->items = 0;
 }
 
 bool pixmap_cache_freeze(PixmapCache *cache)
diff --git a/server/pixmap-cache.h b/server/pixmap-cache.h
index 2f484678..ad308175 100644
--- a/server/pixmap-cache.h
+++ b/server/pixmap-cache.h
@@ -53,7 +53,6 @@ struct PixmapCache {
     Ring lru;
     int64_t available;
     int64_t size;
-    int32_t items;
 
     int frozen;
     RingItem *frozen_head;


More information about the Spice-commits mailing list