summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann <ssp@localhost.localdomain>2010-09-27 03:19:38 -0400
committerSøren Sandmann <ssp@redhat.com>2010-09-27 06:20:05 -0400
commit1eb8da0141f14a4f477b4f32fe4cec16f6637ba5 (patch)
tree3c8175eccea990d8cd319aa82b1849a7e9e4d1ad
parenta1357ad27c166d7c89472c4f4c9436636ac9af03 (diff)
Set the correct size of pixmaps
-rw-r--r--src/qxl_driver.c4
-rw-r--r--src/qxl_surface.c12
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);
}
-