[PATCH xf86-video-ati 4/6] Create radeon_master_screen helper
Michel Dänzer
michel at daenzer.net
Mon Aug 28 09:23:41 UTC 2017
From: Michel Dänzer <michel.daenzer at amd.com>
Preparatory, no functional change intended yet.
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
src/radeon.h | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/radeon.h b/src/radeon.h
index 5ce9999ab..319565a1c 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
--
2.14.1
More information about the amd-gfx
mailing list