From 1eb8da0141f14a4f477b4f32fe4cec16f6637ba5 Mon Sep 17 00:00:00 2001 From: Søren Sandmann Date: Mon, 27 Sep 2010 03:19:38 -0400 Subject: Set the correct size of pixmaps --- src/qxl_driver.c | 4 ++++ src/qxl_surface.c | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/qxl_driver.c b/src/qxl_driver.c index 9c1377d..e94c519 100644 --- a/src/qxl_driver.c +++ b/src/qxl_driver.c @@ -1031,6 +1031,10 @@ qxl_create_pixmap (ScreenPtr screen, int w, int h, int depth, unsigned usage) ErrorF (" Successfully created surface in video memory\n"); pixmap = fbCreatePixmap (screen, 0, 0, depth, usage); + + screen->ModifyPixmapHeader(pixmap, w, h, + -1, -1, -1, + NULL); set_surface (pixmap, surface); } diff --git a/src/qxl_surface.c b/src/qxl_surface.c index 3b177fe..15dda6e 100644 --- a/src/qxl_surface.c +++ b/src/qxl_surface.c @@ -71,7 +71,7 @@ static qxl_surface_t * surface_new (void) { qxl_surface_t *result = NULL; - + if (free_surfaces) { result = free_surfaces; @@ -189,9 +189,10 @@ qxl_surface_create (qxl_screen_t *qxl, pixman_format_code_t pformat; int stride; uint32_t *dev_addr; + static int count; - /* This just doesn't work yet */ - return NULL; + if (++count < 200) + return NULL; #if 0 ErrorF (" qxl_surface: attempting to allocate %d x %d @ %d\n", width, height, bpp); @@ -271,6 +272,10 @@ retry: format = QXL_SURFACE_FMT_32_ARGB; pformat = PIXMAN_a8r8g8b8; break; + + default: + return NULL; + break; } cmd->u.surface_create.format = format; @@ -745,4 +750,3 @@ qxl_surface_copy (qxl_surface_t *dest, push_drawable (qxl, drawable); } - -- cgit v1.2.3