From 7f0cd68d1b0c132e32ae736371bce3e12ed33c7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Mon, 28 Aug 2017 17:53:19 +0900 Subject: Create radeon_master_screen helper Preparatory, no functional change intended yet. Reviewed-by: Alex Deucher --- src/radeon.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/radeon.h b/src/radeon.h index 5ce9999a..319565a1 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -185,6 +185,15 @@ typedef enum { #define radeon_is_gpu_screen(screen) (screen)->isGPU #define radeon_is_gpu_scrn(scrn) (scrn)->is_gpu +static inline ScreenPtr +radeon_master_screen(ScreenPtr screen) +{ + if (screen->current_master) + return screen->current_master; + + return screen; +} + static inline ScreenPtr radeon_dirty_master(PixmapDirtyUpdatePtr dirty) { @@ -194,10 +203,7 @@ radeon_dirty_master(PixmapDirtyUpdatePtr dirty) ScreenPtr screen = dirty->src->drawable.pScreen; #endif - if (screen->current_master) - return screen->current_master; - - return screen; + return radeon_master_screen(screen); } static inline Bool -- cgit v1.2.3