[Spice-devel] [PATCH 1/2] Add new DebugRenderFallbacks option
Søren Sandmann Pedersen
ssp at redhat.com
Thu Mar 28 05:44:48 PDT 2013
This option defaults to off. When enabled, uxa_set_fallback_debug() is
set to true. Later on more debug information may be turned on
conditional on this option.
---
src/qxl.h | 2 ++
src/qxl_driver.c | 14 ++++++++------
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/qxl.h b/src/qxl.h
index c26ea8f..1a7675f 100644
--- a/src/qxl.h
+++ b/src/qxl.h
@@ -104,6 +104,7 @@ enum {
OPTION_ENABLE_IMAGE_CACHE = 0,
OPTION_ENABLE_FALLBACK_CACHE,
OPTION_ENABLE_SURFACES,
+ OPTION_DEBUG_RENDER_FALLBACKS,
OPTION_NUM_HEADS,
#ifdef XSPICE
OPTION_SPICE_PORT,
@@ -274,6 +275,7 @@ struct _qxl_screen_t
int enable_image_cache;
int enable_fallback_cache;
int enable_surfaces;
+ int debug_render_fallbacks;
#ifdef XSPICE
/* XSpice specific */
diff --git a/src/qxl_driver.c b/src/qxl_driver.c
index f1f6592..f146bac 100644
--- a/src/qxl_driver.c
+++ b/src/qxl_driver.c
@@ -76,6 +76,8 @@ const OptionInfoRec DefaultOptions[] =
"EnableFallbackCache", OPTV_BOOLEAN, { 1 }, FALSE },
{ OPTION_ENABLE_SURFACES,
"EnableSurfaces", OPTV_BOOLEAN, { 1 }, FALSE },
+ { OPTION_DEBUG_RENDER_FALLBACKS,
+ "DebugRenderFallbacks", OPTV_BOOLEAN, { 0 }, FALSE },
{ OPTION_NUM_HEADS,
"NumHeads", OPTV_INTEGER, { 4 }, FALSE },
#ifdef XSPICE
@@ -750,9 +752,7 @@ qxl_screen_init (SCREEN_INIT_ARGS_DECL)
qxl_uxa_init (qxl, pScreen);
-#if 0
- uxa_set_fallback_debug(pScreen, TRUE);
-#endif
+ uxa_set_fallback_debug (pScreen, qxl->debug_render_fallbacks);
DamageSetup (pScreen);
@@ -969,11 +969,13 @@ qxl_pre_init_common(ScrnInfoPtr pScrn)
xf86ProcessOptions (scrnIndex, pScrn->options, qxl->options);
qxl->enable_image_cache =
- get_bool_option(qxl->options, OPTION_ENABLE_IMAGE_CACHE, "QXL_ENABLE_IMAGE_CACHE");
+ get_bool_option (qxl->options, OPTION_ENABLE_IMAGE_CACHE, "QXL_ENABLE_IMAGE_CACHE");
qxl->enable_fallback_cache =
- get_bool_option(qxl->options, OPTION_ENABLE_FALLBACK_CACHE, "QXL_ENABLE_FALLBACK_CACHE");
+ get_bool_option (qxl->options, OPTION_ENABLE_FALLBACK_CACHE, "QXL_ENABLE_FALLBACK_CACHE");
qxl->enable_surfaces =
- get_bool_option(qxl->options, OPTION_ENABLE_SURFACES, "QXL_ENABLE_SURFACES");
+ get_bool_option (qxl->options, OPTION_ENABLE_SURFACES, "QXL_ENABLE_SURFACES");
+ qxl->debug_render_fallbacks =
+ get_bool_option (qxl->options, OPTION_DEBUG_RENDER_FALLBACKS, "QXL_DEBUG_RENDER_FALLBACKS");
qxl->num_heads =
get_int_option (qxl->options, OPTION_NUM_HEADS, "QXL_NUM_HEADS");
--
1.7.4
More information about the Spice-devel
mailing list