[Spice-commits] server/display-channel.c server/display-limits.h
Frediano Ziglio
fziglio at kemper.freedesktop.org
Mon Jan 8 10:03:10 UTC 2018
server/display-channel.c | 2 +-
server/display-limits.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 4458cc372b1d686550013b18cc4344a761ca64ef
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Fri Dec 15 13:40:40 2017 +0000
display-channel: Limit number of surfaces to 1024
Qemu never used more than this number and today surfaces are not
much used so there's no reason to keep this limit so high.
This reduces quite a lot some internal structure
(DisplayChannelPrivate and DisplayChannelClientPrivate).
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
diff --git a/server/display-channel.c b/server/display-channel.c
index dae3eb75..6dc10ee7 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -68,7 +68,7 @@ display_channel_set_property(GObject *object,
switch (property_id)
{
case PROP_N_SURFACES:
- self->priv->n_surfaces = g_value_get_uint(value);
+ self->priv->n_surfaces = MIN(g_value_get_uint(value), NUM_SURFACES);
break;
case PROP_VIDEO_CODECS:
display_channel_set_video_codecs(self, g_value_get_boxed(value));
diff --git a/server/display-limits.h b/server/display-limits.h
index 4cf91137..e875149b 100644
--- a/server/display-limits.h
+++ b/server/display-limits.h
@@ -20,7 +20,7 @@
#define DISPLAY_LIMITS_H_
/** Maximum number of surfaces a guest can create */
-#define NUM_SURFACES 10000
+#define NUM_SURFACES 1024
/** Maximum number of streams created by spice-server */
#define NUM_STREAMS 50
More information about the Spice-commits
mailing list