mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-12 23:23:55 +00:00
streaming: Better check for sized frames
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@codeweavers.com>
This commit is contained in:
parent
81f3d44ee7
commit
709c9d71f1
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user