[Spice-devel] [PATCH spice-server] display-channel: Remove current_size field

Christophe Fergeau cfergeau at redhat.com
Fri Jan 27 10:21:49 UTC 2017


Acked-by: Christophe Fergeau <cfergeau at redhat.com>

On Thu, Jan 26, 2017 at 06:17:53PM +0000, Frediano Ziglio wrote:
> This field is used only for debugging.
> Remove it reducing a bit all these "current" fields around.
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/display-channel-private.h | 1 -
>  server/display-channel.c         | 4 +---
>  2 files changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/server/display-channel-private.h b/server/display-channel-private.h
> index 38330da..a930cce 100644
> --- a/server/display-channel-private.h
> +++ b/server/display-channel-private.h
> @@ -33,7 +33,6 @@ struct DisplayChannelPrivate
>      int enable_zlib_glz_wrap;
>  
>      Ring current_list; // of TreeItem
> -    uint32_t current_size;
>  
>      uint32_t drawable_count;
>      _Drawable drawables[NUM_DRAWABLES];
> diff --git a/server/display-channel.c b/server/display-channel.c
> index 6069883..7d3c6e4 100644
> --- a/server/display-channel.c
> +++ b/server/display-channel.c
> @@ -389,7 +389,6 @@ static void current_add_drawable(DisplayChannel *display,
>      ring_add_after(&drawable->tree_item.base.siblings_link, pos);
>      ring_add(&display->priv->current_list, &drawable->list_link);
>      ring_add(&surface->current_list, &drawable->surface_list_link);
> -    display->priv->current_size++;
>      drawable->refs++;
>  }
>  
> @@ -402,7 +401,6 @@ static void current_remove_drawable(DisplayChannel *display, Drawable *item)
>      ring_remove(&item->list_link);
>      ring_remove(&item->surface_list_link);
>      drawable_unref(item);
> -    display->priv->current_size--;
>  }
>  
>  static void drawable_remove_from_pipes(Drawable *drawable)
> @@ -2269,6 +2267,6 @@ void display_channel_debug_oom(DisplayChannel *display, const char *msg)
>                  msg,
>                  display->priv->drawable_count,
>                  display->priv->encoder_shared_data.glz_drawable_count,
> -                display->priv->current_size,
> +                ring_get_length(&display->priv->current_list),
>                  red_channel_sum_pipes_size(channel));
>  }
> -- 
> 2.9.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170127/59bb32e5/attachment-0001.sig>


More information about the Spice-devel mailing list