summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sna/sna_display.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 5bce7642..10ee9e47 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -4307,12 +4307,18 @@ sna_crtc_redisplay__composite(xf86CrtcPtr crtc, RegionPtr region, struct kgem_bo
DBG(("%s: compositing transformed damage boxes\n", __FUNCTION__));
pixmap = sna_pixmap_create_unattached(screen,
- crtc->mode.HDisplay,
- crtc->mode.VDisplay,
- sna->front->drawable.depth);
+ 0, 0, sna->front->drawable.depth);
if (pixmap == NullPixmap)
return;
+ if (!screen->ModifyPixmapHeader(pixmap,
+ crtc->mode.HDisplay,
+ crtc->mode.VDisplay,
+ sna->front->drawable.depth,
+ sna->front->drawable.bitsPerPixel,
+ bo->pitch, NULL))
+ goto free_pixmap;
+
if (!sna_pixmap_attach_to_bo(pixmap, bo))
goto free_pixmap;