diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2016-11-13 14:42:28 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2016-11-13 14:42:28 +0000 |
commit | b08d22f9be60401094322a23b3e468c4dec38029 (patch) | |
tree | 1cfb685eb8bd437daae414a4933c1d5ce0cfa436 /driver/xf86-video-ati/src/radeon_bo_helper.h | |
parent | e63cd1ef185f2d5cde25b041752925a3618e700e (diff) |
Update to xf86-video-ati 7.7.1
Tested by jsg@, Rafael Sadowski and myself on various hardware.
Diffstat (limited to 'driver/xf86-video-ati/src/radeon_bo_helper.h')
-rw-r--r-- | driver/xf86-video-ati/src/radeon_bo_helper.h | 16 |
1 files changed, 16 insertions, 0 deletions
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 */ |