[Spice-devel] [PATCH] Limiting video streaming to the primary surface. freedesktop bug #28088.

Yonit Halperin yhalperi at redhat.com
Thu Aug 19 03:19:31 PDT 2010


---
 server/red_worker.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/server/red_worker.c b/server/red_worker.c
index cbfe405..6fd01d5 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -1516,7 +1516,10 @@ static inline void red_destroy_surface(RedWorker *worker, uint32_t surface_id)
 
     if (!--surface->refs) {
 #ifdef STREAM_TRACE
-        red_reset_stream_trace(worker);
+        // only primary surface streams are supported
+        if (surface_id == 0) {
+            red_reset_stream_trace(worker);
+        }
 #endif
         if (surface->context.canvas) {
             surface->context.canvas->ops->destroy(surface->context.canvas);
@@ -3459,6 +3462,14 @@ static inline void red_update_streamable(RedWorker *worker, Drawable *drawable,
         return;
     }
 
+    /*  We support only streaming on the primary surface. If support for all surfaces
+        is implemented, inter-surfaces dependencies should be handled, similarly to
+        intra-surface dependencies. See the call to red_detach_streams_behind in 
+        red_current_add_with_shadow. */
+    if (drawable->surface_id != 0) {
+        return;
+    }
+
     if (drawable->tree_item.effect != QXL_EFFECT_OPAQUE ||
                                         red_drawable->type != QXL_DRAW_COPY ||
                                         red_drawable->u.copy.rop_descriptor != SPICE_ROPD_OP_PUT) {
-- 
1.7.1.1



More information about the Spice-devel mailing list