Rename detach_stream to stream_detach_drawable and removed unused argument

This function deal only with Stream.
Also the name was misleading and was not clear if it detached the stream
from the DisplayChannel.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
Frediano Ziglio 2016-09-27 13:41:54 +01:00
parent ae01c6d4bc
commit a874ebadff
3 changed files with 9 additions and 9 deletions

View File

@ -1354,7 +1354,7 @@ void drawable_unref(Drawable *drawable)
spice_warn_if_fail(drawable->pipes == NULL);
if (drawable->stream) {
detach_stream(display, drawable->stream);
stream_detach_drawable(drawable->stream);
}
region_destroy(&drawable->tree_item.base.rgn);

View File

@ -320,7 +320,7 @@ static void attach_stream(DisplayChannel *display, Drawable *drawable, Stream *s
}
}
void detach_stream(DisplayChannel *display, Stream *stream)
void stream_detach_drawable(Stream *stream)
{
spice_assert(stream->current && stream->current->stream);
spice_assert(stream->current->stream == stream);
@ -525,7 +525,7 @@ void stream_trace_update(DisplayChannel *display, Drawable *drawable)
if (stream->current) {
stream->current->streamable = FALSE; //prevent item trace
before_reattach_stream(display, stream, drawable);
detach_stream(display, stream);
stream_detach_drawable(stream);
}
attach_stream(display, drawable, stream);
return;
@ -566,7 +566,7 @@ void stream_maintenance(DisplayChannel *display,
stream, TRUE);
if (is_next_frame) {
before_reattach_stream(display, stream, candidate);
detach_stream(display, stream);
stream_detach_drawable(stream);
prev->streamable = FALSE; //prevent item trace
attach_stream(display, candidate, stream);
}
@ -834,7 +834,7 @@ static void red_upgrade_item_free(RedPipeItem *base)
/*
* after dcc_detach_stream_gracefully is called for all the display channel clients,
* detach_stream should be called. See comment (1).
* stream_detach_drawable should be called. See comment (1).
*/
static void dcc_detach_stream_gracefully(DisplayChannelClient *dcc,
Stream *stream,
@ -910,7 +910,7 @@ static void detach_stream_gracefully(DisplayChannel *display, Stream *stream,
dcc_detach_stream_gracefully(dcc, stream, update_area_limit);
}
if (stream->current) {
detach_stream(display, stream);
stream_detach_drawable(stream);
}
}
@ -947,11 +947,11 @@ void stream_detach_behind(DisplayChannel *display, QRegion *region, Drawable *dr
}
}
if (detach && stream->current) {
detach_stream(display, stream);
stream_detach_drawable(stream);
} else if (!is_connected) {
if (stream->current &&
region_intersects(&stream->current->tree_item.base.rgn, region)) {
detach_stream(display, stream);
stream_detach_drawable(stream);
}
}
}

View File

@ -154,6 +154,6 @@ void stream_agent_unref (DisplayChan
StreamAgent *agent);
void stream_agent_stop (StreamAgent *agent);
void detach_stream(DisplayChannel *display, Stream *stream);
void stream_detach_drawable(Stream *stream);
#endif /* STREAM_H */