You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by jm...@apache.org on 2017/01/26 05:02:20 UTC

[1/2] incubator-guacamole-server git commit: GUACAMOLE-184: Only send contents of surface if non-empty.

Repository: incubator-guacamole-server
Updated Branches:
  refs/heads/master 5d5fbb4d4 -> 3f2cdb197


GUACAMOLE-184: Only send contents of surface if non-empty.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/bd3d482a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/bd3d482a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/bd3d482a

Branch: refs/heads/master
Commit: bd3d482adeee4fbeb7a5b3acdd43b96629fdbe4e
Parents: 5d5fbb4
Author: Michael Jumper <mj...@apache.org>
Authored: Mon Sep 12 23:05:18 2016 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Wed Jan 25 19:28:07 2017 -0800

----------------------------------------------------------------------
 src/common/surface.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/bd3d482a/src/common/surface.c
----------------------------------------------------------------------
diff --git a/src/common/surface.c b/src/common/surface.c
index 99e91c0..dbb3b58 100644
--- a/src/common/surface.c
+++ b/src/common/surface.c
@@ -1718,15 +1718,20 @@ void guac_common_surface_dup(guac_common_surface* surface, guac_user* user,
     guac_protocol_send_size(socket, surface->layer,
             surface->width, surface->height);
 
-    /* Get entire surface */
-    cairo_surface_t* rect = cairo_image_surface_create_for_data(
-            surface->buffer, CAIRO_FORMAT_RGB24,
-            surface->width, surface->height, surface->stride);
-
-    /* Send PNG for rect */
-    guac_user_stream_png(user, socket, GUAC_COMP_OVER, surface->layer,
-            0, 0, rect);
-    cairo_surface_destroy(rect);
+    /* Send contents of layer, if non-empty */
+    if (surface->width > 0 && surface->height > 0) {
+
+        /* Get entire surface */
+        cairo_surface_t* rect = cairo_image_surface_create_for_data(
+                surface->buffer, CAIRO_FORMAT_RGB24,
+                surface->width, surface->height, surface->stride);
+
+        /* Send PNG for rect */
+        guac_user_stream_png(user, socket, GUAC_COMP_OVER, surface->layer,
+                0, 0, rect);
+        cairo_surface_destroy(rect);
+
+    }
 
 complete:
     pthread_mutex_unlock(&surface->_lock);


[2/2] incubator-guacamole-server git commit: GUACAMOLE-184: Merge empty surface fix.

Posted by jm...@apache.org.
GUACAMOLE-184: Merge empty surface fix.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/3f2cdb19
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/3f2cdb19
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/3f2cdb19

Branch: refs/heads/master
Commit: 3f2cdb1971b2dad3b9cb557c25430ff72f06b794
Parents: 5d5fbb4 bd3d482
Author: James Muehlner <ja...@guac-dev.org>
Authored: Wed Jan 25 21:01:20 2017 -0800
Committer: James Muehlner <ja...@guac-dev.org>
Committed: Wed Jan 25 21:01:20 2017 -0800

----------------------------------------------------------------------
 src/common/surface.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------