[PATCH xf86-video-ati 4/6] Create radeon_master_screen helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michel Dänzer <michel.daenzer@xxxxxxx>

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



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux