diff options
Diffstat (limited to 'src/radeon.h')
-rw-r--r-- | src/radeon.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/radeon.h b/src/radeon.h index ca509561..d815d3f0 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -184,6 +184,32 @@ typedef enum { #define RADEON_PIXMAP_SHARING 1 #define radeon_is_gpu_screen(screen) (screen)->isGPU #define radeon_is_gpu_scrn(scrn) (scrn)->is_gpu + +static inline ScreenPtr +radeon_dirty_master(PixmapDirtyUpdatePtr dirty) +{ +#ifdef HAS_DIRTYTRACKING_DRAWABLE_SRC + ScreenPtr screen = dirty->src->pScreen; +#else + ScreenPtr screen = dirty->src->drawable.pScreen; +#endif + + if (screen->current_master) + return screen->current_master; + + return screen; +} + +static inline Bool +radeon_dirty_src_equals(PixmapDirtyUpdatePtr dirty, PixmapPtr pixmap) +{ +#ifdef HAS_DIRTYTRACKING_DRAWABLE_SRC + return dirty->src == &pixmap->drawable; +#else + return dirty->src == pixmap; +#endif +} + #else #define radeon_is_gpu_screen(screen) 0 #define radeon_is_gpu_scrn(scrn) 0 |