diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2017-08-15 17:15:27 +0900 |
---|---|---|
committer | Michel Dänzer <michel.daenzer@amd.com> | 2017-08-15 17:15:27 +0900 |
commit | 01b040b4a80754b8c8a305cbe968416182b54246 (patch) | |
tree | 1f27141dd38d7925c5bdc940ecdd83be6563f5ba /src/radeon.h | |
parent | 5309bde0c4e28adf2b167191c6d7011a19e31eed (diff) |
Adapt to PixmapDirtyUpdateRec::src being a DrawablePtr
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 |