[Spice-devel] [PATCH] Rename detach_stream to stream_detach_drawable and removed unused argument
Frediano Ziglio
fziglio at redhat.com
Tue Sep 27 12:42:04 UTC 2016
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 at redhat.com>
---
server/display-channel.c | 2 +-
server/stream.c | 14 +++++++-------
server/stream.h | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/server/display-channel.c b/server/display-channel.c
index 73260df..3835e6f 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -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);
diff --git a/server/stream.c b/server/stream.c
index ee0dded..6687f50 100644
--- a/server/stream.c
+++ b/server/stream.c
@@ -318,7 +318,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);
@@ -523,7 +523,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;
@@ -564,7 +564,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);
}
@@ -833,7 +833,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,
@@ -909,7 +909,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);
}
}
@@ -946,11 +946,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);
}
}
}
diff --git a/server/stream.h b/server/stream.h
index 053b23d..77223c8 100644
--- a/server/stream.h
+++ b/server/stream.h
@@ -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 */
--
2.7.4
More information about the Spice-devel
mailing list