mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-20 12:05:29 +00:00
server/red_worker/video: don't detach a drawable from a stream due to it being rendered.
The previous patch took care that streams will be upgraded by a surface screenshot and not the last frame, if necessary. Thus, there is no more a reason for detaching drawables from streams when they are rendered. Moreover, detaching such drawables can cause glitches, in case they are still in the pipe, and red_update_area is called frequently and leads to stream frames rendering.
This commit is contained in:
parent
81fe00b08a
commit
21b857f3ce
@ -1743,9 +1743,12 @@ static inline void release_drawable(RedWorker *worker, Drawable *drawable)
|
||||
RingItem *item, *next;
|
||||
|
||||
if (!--drawable->refs) {
|
||||
spice_assert(!drawable->stream);
|
||||
spice_assert(!drawable->tree_item.shadow);
|
||||
spice_assert(ring_is_empty(&drawable->pipes));
|
||||
|
||||
if (drawable->stream) {
|
||||
red_detach_stream(worker, drawable->stream);
|
||||
}
|
||||
region_destroy(&drawable->tree_item.base.rgn);
|
||||
|
||||
remove_drawable_dependencies(worker, drawable);
|
||||
@ -1846,9 +1849,7 @@ static inline void current_remove_drawable(RedWorker *worker, Drawable *item)
|
||||
if (item->tree_item.effect != QXL_EFFECT_OPAQUE) {
|
||||
worker->transparent_count--;
|
||||
}
|
||||
if (item->stream) {
|
||||
red_detach_stream(worker, item->stream);
|
||||
} else {
|
||||
if (!item->stream) {
|
||||
red_add_item_trace(worker, item);
|
||||
}
|
||||
remove_shadow(worker, &item->tree_item);
|
||||
@ -2741,9 +2742,7 @@ static inline void red_handle_streams_timout(RedWorker *worker)
|
||||
Stream *stream = SPICE_CONTAINEROF(item, Stream, link);
|
||||
item = ring_next(ring, item);
|
||||
if (now >= (stream->last_time + RED_STREAM_TIMOUT)) {
|
||||
if (stream->current) {
|
||||
red_detach_stream_gracefully(worker, stream);
|
||||
}
|
||||
red_detach_stream_gracefully(worker, stream);
|
||||
red_stop_stream(worker, stream);
|
||||
}
|
||||
}
|
||||
@ -4504,7 +4503,8 @@ static void red_update_area(RedWorker *worker, const SpiceRect *area, int surfac
|
||||
#ifdef ACYCLIC_SURFACE_DEBUG
|
||||
int gn;
|
||||
#endif
|
||||
|
||||
spice_debug("surface %d: area ==>", surface_id);
|
||||
rect_debug(area);
|
||||
surface = &worker->surfaces[surface_id];
|
||||
|
||||
last = NULL;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user