summaryrefslogtreecommitdiff
path: root/gtk/spice-channel-cache.h
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/spice-channel-cache.h')
-rw-r--r--gtk/spice-channel-cache.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/gtk/spice-channel-cache.h b/gtk/spice-channel-cache.h
index e25edc6..dc33cce 100644
--- a/gtk/spice-channel-cache.h
+++ b/gtk/spice-channel-cache.h
@@ -1,3 +1,21 @@
+/* spice/common */
+#include "ring.h"
+
+typedef struct display_cache_item {
+ RingItem hash_link;
+ RingItem lru_link;
+ uint64_t id;
+ uint32_t refcount;
+ void *ptr;
+} display_cache_item;
+
+typedef struct display_cache {
+ const char *name;
+ Ring hash[64];
+ Ring lru;
+ int nitems;
+} display_cache;
+
static inline void cache_init(display_cache *cache, const char *name)
{
int i;