[Spice-devel] [spice v16 01/23] streaming: Better check for sized frames
Francois Gouget
fgouget at codeweavers.com
Tue Jun 7 13:57:43 UTC 2016
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
More information about the Spice-devel
mailing list