[Spice-devel] [spice-server 3/4] streaming: Remove unused detach_stream() argument
Christophe Fergeau
cfergeau at redhat.com
Fri Jun 10 13:48:27 UTC 2016
From: Francois Gouget <fgouget at codeweavers.com>
After the removal of Drawable::sized_stream, the last argument to
detach_stream() is no longer used.
---
The split of this commit and the next one from the "removal of 'sized_stream'"
commit is very artificial, but imo it's useful to separate the logic changes
from the more mechanical ones.
Christophe
server/display-channel.c | 2 +-
server/stream.c | 13 ++++++-------
server/stream.h | 2 +-
3 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/server/display-channel.c b/server/display-channel.c
index 2888cad..0ba4064 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -1396,7 +1396,7 @@ void drawable_unref(Drawable *drawable)
spice_warn_if_fail(ring_is_empty(&drawable->pipes));
if (drawable->stream) {
- detach_stream(display, drawable->stream, TRUE);
+ detach_stream(display, drawable->stream);
}
region_destroy(&drawable->tree_item.base.rgn);
diff --git a/server/stream.c b/server/stream.c
index f527c71..457ee47 100644
--- a/server/stream.c
+++ b/server/stream.c
@@ -321,8 +321,7 @@ static void attach_stream(DisplayChannel *display, Drawable *drawable, Stream *s
}
}
-void detach_stream(DisplayChannel *display, Stream *stream,
- int detach_sized)
+void detach_stream(DisplayChannel *display, Stream *stream)
{
spice_assert(stream->current && stream->current->stream);
spice_assert(stream->current->stream == stream);
@@ -526,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, FALSE);
+ detach_stream(display, stream);
}
attach_stream(display, drawable, stream);
return;
@@ -568,7 +567,7 @@ void stream_maintenance(DisplayChannel *display,
stream, TRUE);
if (is_next_frame != STREAM_FRAME_NONE) {
before_reattach_stream(display, stream, candidate);
- detach_stream(display, stream, FALSE);
+ detach_stream(display, stream);
prev->streamable = FALSE; //prevent item trace
attach_stream(display, candidate, stream);
}
@@ -859,7 +858,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, TRUE);
+ detach_stream(display, stream);
}
}
@@ -896,11 +895,11 @@ void stream_detach_behind(DisplayChannel *display, QRegion *region, Drawable *dr
}
}
if (detach && stream->current) {
- detach_stream(display, stream, TRUE);
+ detach_stream(display, stream);
} else if (!is_connected) {
if (stream->current &&
region_intersects(&stream->current->tree_item.base.rgn, region)) {
- detach_stream(display, stream, TRUE);
+ detach_stream(display, stream);
}
}
}
diff --git a/server/stream.h b/server/stream.h
index 715f920..94ced44 100644
--- a/server/stream.h
+++ b/server/stream.h
@@ -161,6 +161,6 @@ void stream_agent_unref (DisplayChan
StreamAgent *agent);
void stream_agent_stop (StreamAgent *agent);
-void detach_stream(DisplayChannel *display, Stream *stream, int detach_sized);
+void detach_stream(DisplayChannel *display, Stream *stream);
#endif /* STREAM_H */
--
2.7.4
More information about the Spice-devel
mailing list