[Spice-devel] [spice v16 02/23] streaming: Remove the Drawable.sized_stream field
Christophe Fergeau
cfergeau at redhat.com
Fri Jun 10 13:45:50 UTC 2016
Hey,
Thanks for working on this, makes the code easier to follow!
Imo it's easier to review if (artificially) split, I'll send what I did
as a followup to this patch.
Just one minor comment below:
On Tue, Jun 07, 2016 at 03:58:00PM +0200, Francois Gouget wrote:
> Only red_marshall_stream_data() needs to know whether to send the frame
> using a SpiceMsgDisplayStreamDataSized or a regular StreamData message.
> So check whether we have a sized frame there and simplify the rest of
> the code.
>
> Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
> ---
> server/dcc-send.c | 39 +++++++++++-----------------
> server/display-channel.c | 2 +-
> server/display-channel.h | 1 -
> server/stream.c | 67 +++++++++++++++---------------------------------
> server/stream.h | 8 +-----
> 5 files changed, 38 insertions(+), 79 deletions(-)
>
> diff --git a/server/dcc-send.c b/server/dcc-send.c
> index 5171f9a..798a9b3 100644
> --- a/server/dcc-send.c
> +++ b/server/dcc-send.c
> @@ -1657,36 +1657,27 @@ static int red_marshall_stream_data(RedChannelClient *rcc,
> DisplayChannelClient *dcc = RCC_TO_DCC(rcc);
> DisplayChannel *display = DCC_TO_DC(dcc);
> Stream *stream = drawable->stream;
> - SpiceImage *image;
> + SpiceCopy *copy;
> uint32_t frame_mm_time;
> uint32_t n;
> - int width, height;
> + int is_sized, width, height;
> int ret;
>
> - if (!stream) {
> - spice_assert(drawable->sized_stream);
> - stream = drawable->sized_stream;
> - }
We could keep some check that 'drawable->stream' is not NULL, maybe not
an assert, but a g_return_val_if_fail(stream != NULL, FALSE); ?
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160610/0cd16f6d/attachment.sig>
More information about the Spice-devel
mailing list