From b08d22f9be60401094322a23b3e468c4dec38029 Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Sun, 13 Nov 2016 14:42:28 +0000 Subject: Update to xf86-video-ati 7.7.1 Tested by jsg@, Rafael Sadowski and myself on various hardware. --- driver/xf86-video-ati/src/radeon_bo_helper.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'driver/xf86-video-ati/src/radeon_bo_helper.h') diff --git a/driver/xf86-video-ati/src/radeon_bo_helper.h b/driver/xf86-video-ati/src/radeon_bo_helper.h index d4a4ee018..f1aed5516 100644 --- a/driver/xf86-video-ati/src/radeon_bo_helper.h +++ b/driver/xf86-video-ati/src/radeon_bo_helper.h @@ -41,4 +41,20 @@ extern Bool radeon_set_shared_pixmap_backing(PixmapPtr ppix, void *fd_handle, struct radeon_surface *surface); +/** + * get_drawable_pixmap() returns the backing pixmap for a given drawable. + * + * @param drawable the drawable being requested. + * + * This function returns the backing pixmap for a drawable, whether it is a + * redirected window, unredirected window, or already a pixmap. + */ +static inline PixmapPtr get_drawable_pixmap(DrawablePtr drawable) +{ + if (drawable->type == DRAWABLE_PIXMAP) + return (PixmapPtr)drawable; + else + return drawable->pScreen->GetWindowPixmap((WindowPtr)drawable); +} + #endif /* RADEON_BO_HELPER_H */ -- cgit v1.2.3