From 9d2b76652f0bca5680b9e3ae2aacd508d5525684 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 19 Jun 2015 15:56:13 -0700 Subject: [PATCH] modesetting: No need to free the EGLImage just before freeing the pixmap. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DestroyPixmap handles that just fine. This also lets us drop our use of the manual image destruction function (Note that the radeon driver still uses it in a similar fashion, though). Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer --- hw/xfree86/drivers/modesetting/drmmode_display.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 442157855..0d34ca1c8 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -780,7 +780,6 @@ drmmode_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data) drmmode_ptr drmmode = drmmode_crtc->drmmode; if (rotate_pixmap) { - drmmode_set_pixmap_bo(drmmode, rotate_pixmap, NULL); rotate_pixmap->drawable.pScreen->DestroyPixmap(rotate_pixmap); } @@ -1588,11 +1587,6 @@ drmmode_set_pixmap_bo(drmmode_ptr drmmode, PixmapPtr pixmap, drmmode_bo *bo) if (!drmmode->glamor) return TRUE; - if (bo == NULL) { - glamor_egl_destroy_textured_pixmap(pixmap); - return TRUE; - } - #ifdef GLAMOR_HAS_GBM if (!glamor_egl_create_textured_pixmap_from_gbm_bo(pixmap, bo->gbm)) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed");