[Spice-commits] server/display-channel.c server/red-worker.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Tue Nov 1 12:29:54 UTC 2016
server/display-channel.c | 5 ++---
server/red-worker.c | 2 --
2 files changed, 2 insertions(+), 5 deletions(-)
New commits:
commit 207cd10dccda47fa37baa82096dcd51e01c66661
Author: Jonathon Jongsma <jjongsma at redhat.com>
Date: Mon Oct 31 16:06:51 2016 -0500
Limit maximum "n-surfaces" via param spec
In commit beec1b41, we manually limited this property value in
_set_property(). But there's a simpler way to do it: via the param spec
for the property.
This also means that we can remove the warning log in red_worker_new()
since GObject will automatically warn if a property is assigned a value
outside of its valid range.
Change the minimum and default value for this property from 0 to 1 so
that we always have a primary surface.
Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/server/display-channel.c b/server/display-channel.c
index c115146..bcdde13 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -60,7 +60,6 @@ display_channel_set_property(GObject *object,
{
case PROP_N_SURFACES:
self->priv->n_surfaces = g_value_get_uint(value);
- self->priv->n_surfaces = MIN(self->priv->n_surfaces, NUM_SURFACES);
break;
case PROP_VIDEO_CODECS:
if (self->priv->video_codecs) {
@@ -2238,8 +2237,8 @@ display_channel_class_init(DisplayChannelClass *klass)
g_param_spec_uint("n-surfaces",
"number of surfaces",
"Number of surfaces for this channel",
- 0, G_MAXUINT,
- 0,
+ 1, NUM_SURFACES,
+ 1,
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
diff --git a/server/red-worker.c b/server/red-worker.c
index ab9d79c..4383646 100644
--- a/server/red-worker.c
+++ b/server/red-worker.c
@@ -1358,8 +1358,6 @@ RedWorker* red_worker_new(QXLInstance *qxl,
init_info.memslot_id_bits,
init_info.internal_groupslot_id);
- spice_warn_if_fail(init_info.n_surfaces <= NUM_SURFACES);
-
worker->event_timeout = INF_EVENT_WAIT;
worker->cursor_channel = cursor_channel_new(reds, qxl,
More information about the Spice-commits
mailing list