[Spice-commits] server/red_worker.c
Yonit Halperin
yhalperi at kemper.freedesktop.org
Tue Aug 31 03:31:15 PDT 2010
server/red_worker.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
New commits:
commit 8bc4fe03446ddcb63d4576c643499480f429804c
Author: Yonit Halperin <yhalperi at redhat.com>
Date: Tue Aug 31 09:19:32 2010 +0300
server: red_current_add_equal - don't push a drawable to the middle of the pipe if it depends on surfaces.
This will prevent: 1) rendering problems (commands sent to the client in the wrong order)
2) sending commands for surfaces that haven't been created yet on the client side.
diff --git a/server/red_worker.c b/server/red_worker.c
index a11f428..36c2763 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -2785,6 +2785,18 @@ static inline void red_stream_maintenance(RedWorker *worker, Drawable *candidate
}
}
+static inline int is_drawable_independent_from_surfaces(Drawable *drawable)
+{
+ int x;
+
+ for (x = 0; x < 3; ++x) {
+ if (drawable->surfaces_dest[x] != -1) {
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
static inline int red_current_add_equal(RedWorker *worker, DrawItem *item, TreeItem *other)
{
DrawItem *other_draw_item;
@@ -2804,7 +2816,7 @@ static inline int red_current_add_equal(RedWorker *worker, DrawItem *item, TreeI
other_drawable = SPICE_CONTAINEROF(other_draw_item, Drawable, tree_item);
if (item->effect == QXL_EFFECT_OPAQUE) {
- int add_after = !!other_drawable->stream;
+ int add_after = !!other_drawable->stream && is_drawable_independent_from_surfaces(drawable);
red_stream_maintenance(worker, drawable, other_drawable);
__current_add_drawable(worker, drawable, &other->siblings_link);
if (add_after) {
More information about the Spice-commits
mailing list