[Spice-devel] [PATCH 0/5] Remove CommonGraphicsChannelClient

Frediano Ziglio fziglio at redhat.com
Sat May 7 13:49:50 UTC 2016


This is a kind of replacement to the "Move CommonGraphicsChannelClient
to a separate file" refactory patch. The idea came after looking at
the patch.

Reasons:
- CommonGraphicsChannelClient contains 2 fields:
  - RedChannelClient;
  - int is_low_bandwidth;
- is_low_bandwidth is readed only by DisplayChannel, never
  by CursorChannel and CommonGraphicsChannelClient is the
  common part of CursorChannelClient and DisplayChannelClient.
So after removing the not really common part only a single field
remains, so no much reasons to keep it.

The patch serie is organized in small step and retain the
complete behavior of the old code.
Patches could be squashed together.

As an improvement I would read the "low bandwidth" condition
from MainChannelClient (or better stored in RedClient). The
condition is copied from MainChannelClient when
DisplayChannelClient is created and never changed.
I decided to not do this last change to retain 100% compatibility
(even if not really correct).

Frediano Ziglio (5):
  move channel window setting to config_socket
  move during_target_migrate out of common_graphics_channel_new_client
  remove common_graphics_channel_new_client function
  move is_low_bandwidth to DisplayChannelClient
  remove CommonGraphicsChannelClient structure

 server/cache-item.tmpl.c |  2 +-
 server/cursor-channel.c  | 22 +++++++++++-----------
 server/dcc-send.c        |  2 +-
 server/dcc.c             | 24 +++++++++++++-----------
 server/dcc.h             |  9 +++++----
 server/display-channel.c | 21 ++++++++++++++++-----
 server/display-channel.h |  2 +-
 server/red-worker.c      | 40 ++++++++--------------------------------
 server/red-worker.h      | 18 +-----------------
 server/stream.c          |  6 +++---
 10 files changed, 60 insertions(+), 86 deletions(-)

-- 
2.5.5



More information about the Spice-devel mailing list