[Spice-devel] [xspice 1/6] Handle cache and surface options the same way we handle all options.

Jeremy White jwhite at codeweavers.com
Thu Mar 14 10:59:49 PDT 2013


Add comment lines for them to the example xorg.conf file.

Signed-off-by: Jeremy White <jwhite at codeweavers.com>
---
 examples/spiceqxl.xorg.conf.example |   12 ++++++++++++
 src/qxl_driver.c                    |   12 ++++++------
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/examples/spiceqxl.xorg.conf.example b/examples/spiceqxl.xorg.conf.example
index 6240b14..fd94dc1 100644
--- a/examples/spiceqxl.xorg.conf.example
+++ b/examples/spiceqxl.xorg.conf.example
@@ -79,6 +79,18 @@ Section "Device"
 
     # If set, the Spice Server will exit when the first client disconnects
     #Option "SpiceExitOnDisconnect" "1"
+
+    # Enable caching of images directly written with uxa->put_image
+    # defaults to True
+    #Option "EnableImageCache" "True"
+
+    # Enable caching of images created by uxa->prepare_access
+    # defaults to True
+    #Option "EnableFallbackCache" "True"
+
+    # Enable the use of off screen srufaces
+    # defaults to True
+    #Option "EnableSurfaces" "True"
 EndSection
 
 Section "InputDevice"
diff --git a/src/qxl_driver.c b/src/qxl_driver.c
index 7b59b2c..1d58f01 100644
--- a/src/qxl_driver.c
+++ b/src/qxl_driver.c
@@ -64,11 +64,11 @@ extern void compat_init_scrn (ScrnInfoPtr);
 const OptionInfoRec DefaultOptions[] =
 {
     { OPTION_ENABLE_IMAGE_CACHE,
-      "EnableImageCache",         OPTV_BOOLEAN, { 0 }, TRUE },
+      "EnableImageCache",         OPTV_BOOLEAN, { 1 }, FALSE },
     { OPTION_ENABLE_FALLBACK_CACHE,
-      "EnableFallbackCache",      OPTV_BOOLEAN, { 0 }, TRUE },
+      "EnableFallbackCache",      OPTV_BOOLEAN, { 1 }, FALSE },
     { OPTION_ENABLE_SURFACES,
-      "EnableSurfaces",           OPTV_BOOLEAN, { 0 }, TRUE },
+      "EnableSurfaces",           OPTV_BOOLEAN, { 1 }, FALSE },
     { OPTION_NUM_HEADS,
       "NumHeads",                 OPTV_INTEGER, { 4 }, FALSE },
 #ifdef XSPICE
@@ -970,11 +970,11 @@ qxl_pre_init_common(ScrnInfoPtr pScrn)
     xf86ProcessOptions (scrnIndex, pScrn->options, qxl->options);
 
     qxl->enable_image_cache =
-        xf86ReturnOptValBool (qxl->options, OPTION_ENABLE_IMAGE_CACHE, TRUE);
+        get_bool_option(qxl->options, OPTION_ENABLE_IMAGE_CACHE, "QXL_ENABLE_IMAGE_CACHE");
     qxl->enable_fallback_cache =
-        xf86ReturnOptValBool (qxl->options, OPTION_ENABLE_FALLBACK_CACHE, TRUE);
+        get_bool_option(qxl->options, OPTION_ENABLE_FALLBACK_CACHE, "QXL_ENABLE_FALLBACK_CACHE");
     qxl->enable_surfaces =
-        xf86ReturnOptValBool (qxl->options, OPTION_ENABLE_SURFACES, TRUE);
+        get_bool_option(qxl->options, OPTION_ENABLE_SURFACES, "QXL_ENABLE_SURFACES");
     qxl->num_heads =
         get_int_option (qxl->options, OPTION_NUM_HEADS, "QXL_NUM_HEADS");
 
-- 
1.7.10.4





More information about the Spice-devel mailing list