[Spice-devel] [spice v16 01/23] streaming: Better check for sized frames

Christophe Fergeau cfergeau at redhat.com
Fri Jun 10 16:18:52 UTC 2016


Hey,

Not sure I would bother changing that logic right now, ie I'd just drop
that patch.

Christophe

On Tue, Jun 07, 2016 at 03:57:43PM +0200, Francois Gouget wrote:
> Usually the RedDrawable bbox dimensions match the src_area dimensions
> so that checking that the bbox matches the stream's original dest_area
> should be enough to determine if sized stream support is needed to
> send the frame.
> But making the bbox different could be used to have the scaling be
> performed on the client side. So it's better not to assume the bbox and
> src_area have the same dimensions.
> 
> Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
> ---
>  server/stream.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/server/stream.c b/server/stream.c
> index 2aa13d1..d8be148 100644
> --- a/server/stream.c
> +++ b/server/stream.c
> @@ -252,6 +252,7 @@ static int is_next_stream_frame(DisplayChannel *display,
>          }
>      } else {
>          if (rect_contains(&red_drawable->bbox, other_dest)) {
> +            SpiceRect* candidate_src;
>              int candidate_area = rect_get_area(&red_drawable->bbox);
>              int other_area = rect_get_area(other_dest);
>              /* do not stream drawables that are significantly
> @@ -265,7 +266,10 @@ static int is_next_stream_frame(DisplayChannel *display,
>                  return STREAM_FRAME_NONE;
>              }
>  
> -            if (candidate_area > other_area) {
> +            candidate_src = &red_drawable->u.copy.src_area;
> +            if (candidate_area > other_area ||
> +                candidate_src->right - candidate_src->left != other_src_width ||
> +                candidate_src->bottom - candidate_src->top != other_src_height) {
>                  is_frame_container = TRUE;
>              }
>          } else {
> -- 
> 2.8.1
> 
> _______________________________________________
> 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: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160610/7c36d246/attachment.sig>


More information about the Spice-devel mailing list