summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy White <jwhite@codeweavers.com>2012-09-10 10:36:39 -0500
committerJeremy White <jwhite@codeweavers.com>2013-01-11 08:52:27 -0600
commit7d62dcc6d400e3f96fb7921fbdb852f3b9024b17 (patch)
treeccc275700223293cec7dcd865353823f916d69c8
parenta44be4fd011cc0b80d0c8109589e7aa1c26cad1e (diff)
Add a DeferredFPS option.
-rw-r--r--examples/spiceqxl.xorg.conf.example7
-rw-r--r--src/qxl.h3
-rw-r--r--src/qxl_driver.c10
3 files changed, 20 insertions, 0 deletions
diff --git a/examples/spiceqxl.xorg.conf.example b/examples/spiceqxl.xorg.conf.example
index f5868c1..a2f2ad9 100644
--- a/examples/spiceqxl.xorg.conf.example
+++ b/examples/spiceqxl.xorg.conf.example
@@ -70,6 +70,13 @@ Section "Device"
# Set to true to only listen on ipv6 interfaces.
# defaults to false.
#Option "SpiceIPV6Only" ""
+
+ # If non zero, the driver will render all operations to the frame buffer,
+ # and keep track of a changed rectangle list. The changed rectangles
+ # will be transmitted at the rate requested (e.g. 10 Frames Per Second)
+ # This can dramatically reduce network bandwidth for some use cases.
+ #Option "SpiceDeferredFPS" "10"
+
EndSection
Section "InputDevice"
diff --git a/src/qxl.h b/src/qxl.h
index 4cf9830..1389658 100644
--- a/src/qxl.h
+++ b/src/qxl.h
@@ -127,6 +127,7 @@ enum {
OPTION_SPICE_TLS_CIPHERS,
OPTION_SPICE_CACERT_FILE,
OPTION_SPICE_DH_FILE,
+ OPTION_SPICE_DEFERRED_FPS,
#endif
OPTION_COUNT,
};
@@ -260,6 +261,8 @@ struct _qxl_screen_t
uint32_t bytes_pp;
uint8_t *data, *flipped;
} guest_primary;
+
+ uint32_t deferred_fps;
#endif /* XSPICE */
};
diff --git a/src/qxl_driver.c b/src/qxl_driver.c
index e29a7ae..b01845c 100644
--- a/src/qxl_driver.c
+++ b/src/qxl_driver.c
@@ -124,6 +124,8 @@ const OptionInfoRec DefaultOptions[] =
"SpiceCacertFile", OPTV_STRING, {0}, FALSE},
{ OPTION_SPICE_DH_FILE,
"SpiceDhFile", OPTV_STRING, {0}, FALSE},
+ { OPTION_SPICE_DEFERRED_FPS,
+ "SpiceDeferredFPS", OPTV_INTEGER, {0}, FALSE},
#endif
{ -1, NULL, OPTV_NONE, {0}, FALSE }
@@ -2415,6 +2417,14 @@ qxl_pre_init (ScrnInfoPtr pScrn, int flags)
qxl->num_heads =
get_int_option (qxl->options, OPTION_NUM_HEADS, "QXL_NUM_HEADS");
+#ifdef XSPICE
+ qxl->deferred_fps = get_int_option(qxl->options, OPTION_SPICE_DEFERRED_FPS, "XSPICE_DEFERRED_FPS");
+ if (qxl->deferred_fps > 0)
+ xf86DrvMsg(scrnIndex, X_INFO, "Deferred FPS: %d\n", qxl->deferred_fps);
+ else
+ xf86DrvMsg(scrnIndex, X_INFO, "Deferred Frames: Disabled\n");
+#endif
+
xf86DrvMsg (scrnIndex, X_INFO, "Offscreen Surfaces: %s\n",
qxl->enable_surfaces ? "Enabled" : "Disabled");
xf86DrvMsg (scrnIndex, X_INFO, "Image Cache: %s\n",