[Spice-devel] [PATCH 2/2] Simplify DisplayChannel hold_item()
Pavel Grunt
pgrunt at redhat.com
Fri May 20 06:26:13 UTC 2016
On Thu, 2016-05-19 at 14:05 -0500, Jonathon Jongsma wrote:
> Since all pipe items implement refcounting now, just call
> red_pipe_item_ref() and eliminate the switch statement.
Acked-by: Pavel Grunt <pgrunt at redhat.com>
> ---
> server/display-channel.c | 11 +----------
> 1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/server/display-channel.c b/server/display-channel.c
> index 1487f10..3f414fd 100644
> --- a/server/display-channel.c
> +++ b/server/display-channel.c
> @@ -1934,16 +1934,7 @@ static void hold_item(RedChannelClient *rcc,
> RedPipeItem *item)
> {
> spice_return_if_fail(item);
>
> - switch (item->type) {
> - case RED_PIPE_ITEM_TYPE_DRAW:
> - case RED_PIPE_ITEM_TYPE_IMAGE:
> - case RED_PIPE_ITEM_TYPE_STREAM_CLIP:
> - case RED_PIPE_ITEM_TYPE_UPGRADE:
> - red_pipe_item_ref(item);
> - break;
> - default:
> - spice_warn_if_reached();
> - }
> + red_pipe_item_ref(item);
> }
>
> static int handle_migrate_flush_mark(RedChannelClient *rcc)
More information about the Spice-devel
mailing list