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:39:49 UTC

[1/2] incubator-guacamole-client git commit: GUACAMOLE-177: Tie all layer property changes to display frame flush.

Repository: incubator-guacamole-client
Updated Branches:
  refs/heads/master 8de93ad4e -> a64c35825


GUACAMOLE-177: Tie all layer property changes to display frame flush.


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

Branch: refs/heads/master
Commit: 47f2b95abc66c9b1636aa411ab399b8085683bbb
Parents: 8de93ad
Author: Michael Jumper <mj...@apache.org>
Authored: Thu Oct 6 21:51:40 2016 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Tue Jan 24 16:09:13 2017 -0800

----------------------------------------------------------------------
 .../src/main/webapp/modules/Client.js           |  8 +-
 .../src/main/webapp/modules/Display.js          | 86 ++++++++++++++++++++
 2 files changed, 90 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/47f2b95a/guacamole-common-js/src/main/webapp/modules/Client.js
----------------------------------------------------------------------
diff --git a/guacamole-common-js/src/main/webapp/modules/Client.js b/guacamole-common-js/src/main/webapp/modules/Client.js
index 1eb21f3..cb9f014 100644
--- a/guacamole-common-js/src/main/webapp/modules/Client.js
+++ b/guacamole-common-js/src/main/webapp/modules/Client.js
@@ -865,7 +865,7 @@ Guacamole.Client = function(tunnel) {
 
                 // Remove from parent
                 var layer = getLayer(layer_index);
-                layer.dispose();
+                display.dispose(layer);
 
                 // Delete reference
                 delete layers[layer_index];
@@ -893,7 +893,7 @@ Guacamole.Client = function(tunnel) {
             // Only valid for visible layers (not buffers)
             if (layer_index >= 0) {
                 var layer = getLayer(layer_index);
-                layer.distort(a, b, c, d, e, f);
+                display.distort(layer, a, b, c, d, e, f);
             }
 
         },
@@ -1049,7 +1049,7 @@ Guacamole.Client = function(tunnel) {
             if (layer_index > 0 && parent_index >= 0) {
                 var layer = getLayer(layer_index);
                 var parent = getLayer(parent_index);
-                layer.move(parent, x, y, z);
+                display.move(layer, parent, x, y, z);
             }
 
         },
@@ -1151,7 +1151,7 @@ Guacamole.Client = function(tunnel) {
             // Only valid for visible layers (not buffers)
             if (layer_index >= 0) {
                 var layer = getLayer(layer_index);
-                layer.shade(a);
+                display.shade(layer, a);
             }
 
         },

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/47f2b95a/guacamole-common-js/src/main/webapp/modules/Display.js
----------------------------------------------------------------------
diff --git a/guacamole-common-js/src/main/webapp/modules/Display.js b/guacamole-common-js/src/main/webapp/modules/Display.js
index 8220fc3..f14c6bf 100644
--- a/guacamole-common-js/src/main/webapp/modules/Display.js
+++ b/guacamole-common-js/src/main/webapp/modules/Display.js
@@ -989,6 +989,92 @@ Guacamole.Display = function() {
     };
 
     /**
+     * Removes the given layer container entirely, such that it is no longer
+     * contained within its parent layer, if any.
+     *
+     * @param {Guacamole.Display.VisibleLayer} layer
+     *     The layer being removed from its parent.
+     */
+    this.dispose = function dispose(layer) {
+        scheduleTask(function disposeLayer() {
+            layer.dispose();
+        });
+    };
+
+    /**
+     * Applies the given affine transform (defined with six values from the
+     * transform's matrix) to the given layer.
+     *
+     * @param {Guacamole.Display.VisibleLayer} layer
+     *     The layer being distorted.
+     *
+     * @param {Number} a
+     *     The first value in the affine transform's matrix.
+     *
+     * @param {Number} b
+     *     The second value in the affine transform's matrix.
+     *
+     * @param {Number} c
+     *     The third value in the affine transform's matrix.
+     *
+     * @param {Number} d
+     *     The fourth value in the affine transform's matrix.
+     *
+     * @param {Number} e
+     *     The fifth value in the affine transform's matrix.
+     *
+     * @param {Number} f
+     *     The sixth value in the affine transform's matrix.
+     */
+    this.distort = function distort(layer, a, b, c, d, e, f) {
+        scheduleTask(function distortLayer() {
+            layer.distort(a, b, c, d, e, f);
+        });
+    };
+
+    /**
+     * Moves the upper-left corner of the given layer to the given X and Y
+     * coordinate, sets the Z stacking order, and reparents the layer
+     * to the given parent layer.
+     *
+     * @param {Guacamole.Display.VisibleLayer} layer
+     *     The layer being moved.
+     *
+     * @param {Guacamole.Display.VisibleLayer} parent
+     *     The parent to set.
+     *
+     * @param {Number} x
+     *     The X coordinate to move to.
+     *
+     * @param {Number} y
+     *     The Y coordinate to move to.
+     *
+     * @param {Number} z
+     *     The Z coordinate to move to.
+     */
+    this.move = function move(layer, parent, x, y, z) {
+        scheduleTask(function moveLayer() {
+            layer.move(parent, x, y, z);
+        });
+    };
+
+    /**
+     * Sets the opacity of the given layer to the given value, where 255 is
+     * fully opaque and 0 is fully transparent.
+     *
+     * @param {Guacamole.Display.VisibleLayer} layer
+     *     The layer whose opacity should be set.
+     *
+     * @param {Number} alpha
+     *     The opacity to set.
+     */
+    this.shade = function shade(layer, alpha) {
+        scheduleTask(function shadeLayer() {
+            layer.shade(alpha);
+        });
+    };
+
+    /**
      * Sets the scale of the client display element such that it renders at
      * a relatively smaller or larger size, without affecting the true
      * resolution of the display.


[2/2] incubator-guacamole-client git commit: GUACAMOLE-177: Merge layer property change improvements.

Posted by jm...@apache.org.
GUACAMOLE-177: Merge layer property change improvements.


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

Branch: refs/heads/master
Commit: a64c358250039d720eaa8aea65781e1a357436ec
Parents: 8de93ad 47f2b95
Author: James Muehlner <ja...@guac-dev.org>
Authored: Wed Jan 25 21:34:50 2017 -0800
Committer: James Muehlner <ja...@guac-dev.org>
Committed: Wed Jan 25 21:34:50 2017 -0800

----------------------------------------------------------------------
 .../src/main/webapp/modules/Client.js           |  8 +-
 .../src/main/webapp/modules/Display.js          | 86 ++++++++++++++++++++
 2 files changed, 90 insertions(+), 4 deletions(-)
----------------------------------------------------------------------