summaryrefslogtreecommitdiff
path: root/src/radeon.h
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-12-01 15:49:11 +0100
committerMichel Dänzer <michel.daenzer@amd.com>2017-12-01 15:49:11 +0100
commitee907e9b9563609cb4a4817e17215b50bb1c7177 (patch)
tree167777cf2a47f22c57de570195fd59833aa8e137 /src/radeon.h
parentfccfd75ecf9ccfa628a8ff9c1fbb7f60c0f10ea5 (diff)
Add radeon_dirty_src_drawable helper
Allows tidying up radeon_dirty_src_equals and redisplay_dirty slightly. (Cherry picked from amdgpu commit 1d65ac395971571094df21ca0408d5972c6b56ec) Acked-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon.h')
-rw-r--r--src/radeon.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/radeon.h b/src/radeon.h
index 3e04101c..cc5dc09f 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -192,23 +192,23 @@ radeon_master_screen(ScreenPtr screen)
static inline ScreenPtr
radeon_dirty_master(PixmapDirtyUpdatePtr dirty)
{
+ return radeon_master_screen(dirty->slave_dst->drawable.pScreen);
+}
+
+static inline DrawablePtr
+radeon_dirty_src_drawable(PixmapDirtyUpdatePtr dirty)
+{
#ifdef HAS_DIRTYTRACKING_DRAWABLE_SRC
- ScreenPtr screen = dirty->src->pScreen;
+ return dirty->src;
#else
- ScreenPtr screen = dirty->src->drawable.pScreen;
+ return &dirty->src->drawable;
#endif
-
- return radeon_master_screen(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
+ return radeon_dirty_src_drawable(dirty) == &pixmap->drawable;
}