--- src/qxl_driver.c | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/src/qxl_driver.c b/src/qxl_driver.c index 1c79060..c43cbde 100644 --- a/src/qxl_driver.c +++ b/src/qxl_driver.c @@ -1616,28 +1616,9 @@ qxl_destroy_pixmap (PixmapPtr pixmap) return TRUE; } -static Bool -setup_uxa (qxl_screen_t *qxl, ScreenPtr screen) +static void +set_uxa_functions(qxl_screen_t *qxl, ScreenPtr screen) { - ScrnInfoPtr scrn = xf86ScreenToScrn (screen); - -#if HAS_DIXREGISTERPRIVATEKEY - if (!dixRegisterPrivateKey (&uxa_pixmap_index, PRIVATE_PIXMAP, 0)) - return FALSE; -#else - if (!dixRequestPrivate (&uxa_pixmap_index, 0)) - return FALSE; -#endif - - qxl->uxa = uxa_driver_alloc (); - if (qxl->uxa == NULL) - return FALSE; - - memset (qxl->uxa, 0, sizeof (*qxl->uxa)); - - qxl->uxa->uxa_major = 1; - qxl->uxa->uxa_minor = 0; - /* Solid fill */ qxl->uxa->check_solid = qxl_check_solid; qxl->uxa->prepare_solid = qxl_prepare_solid; @@ -1670,7 +1651,32 @@ setup_uxa (qxl_screen_t *qxl, ScreenPtr screen) screen->SetScreenPixmap = qxl_set_screen_pixmap; screen->CreatePixmap = qxl_create_pixmap; screen->DestroyPixmap = qxl_destroy_pixmap; +} + +static Bool +setup_uxa (qxl_screen_t *qxl, ScreenPtr screen) +{ + ScrnInfoPtr scrn = xf86ScreenToScrn (screen); +#if HAS_DIXREGISTERPRIVATEKEY + if (!dixRegisterPrivateKey (&uxa_pixmap_index, PRIVATE_PIXMAP, 0)) + return FALSE; +#else + if (!dixRequestPrivate (&uxa_pixmap_index, 0)) + return FALSE; +#endif + + qxl->uxa = uxa_driver_alloc (); + if (qxl->uxa == NULL) + return FALSE; + + memset (qxl->uxa, 0, sizeof (*qxl->uxa)); + + qxl->uxa->uxa_major = 1; + qxl->uxa->uxa_minor = 0; + + set_uxa_functions(qxl, screen); + if (!uxa_driver_init (screen, qxl->uxa)) { xf86DrvMsg (scrn->scrnIndex, X_ERROR, -- 1.7.9.5 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel