summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/qxl_surface.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qxl_surface.c b/src/qxl_surface.c
index f02931a..0abea2e 100644
--- a/src/qxl_surface.c
+++ b/src/qxl_surface.c
@@ -859,8 +859,12 @@ qxl_surface_kill (qxl_surface_t *surface)
surface->bpp);
#endif
- if (surface->id != 0)
+ if (surface->id != 0 &&
+ pixman_image_get_width (surface->host_image) > 128 &&
+ pixman_image_get_height (surface->host_image) > 128)
+ {
surface_add_to_cache (surface);
+ }
#if 0
ErrorF ("After adding %d to cache\n", surface->id);