summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-08-28 17:53:19 +0900
committerMichel Dänzer <michel@daenzer.net>2017-08-29 16:35:16 +0900
commit7f0cd68d1b0c132e32ae736371bce3e12ed33c7a (patch)
treef14e9d585252728dce13f9adde06c0bb90101ac6
parent20f6b56fdb74d88086e8e094013fedbb14e50a24 (diff)
Create radeon_master_screen helper
Preparatory, no functional change intended yet. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/radeon.h14
1 files 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
@@ -186,6 +186,15 @@ typedef enum {
#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)
{
#ifdef HAS_DIRTYTRACKING_DRAWABLE_SRC
@@ -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