diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-16 11:08:05 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-16 12:18:28 +0000 |
commit | 242d7503ddd98c59feda4bcc25e70cac06d3325e (patch) | |
tree | 23708629a02ba3467a3073b270b3864fcb419419 /src/sna | |
parent | 587452a6ad7ac57e37820c72220c4944451315a8 (diff) |
sna: Avoid allocating temporary storage for TearFree rotations
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/sna_display.c | 12 |
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; |