aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drmtools.c6
-rw-r--r--fb-gui.c2
-rw-r--r--gfx.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/drmtools.c b/drmtools.c
index b6a60ea..ac501d5 100644
--- a/drmtools.c
+++ b/drmtools.c
@@ -200,6 +200,11 @@ static void drm_restore_display(void)
drm_show_fb();
}
+static void drm_flush_display(void)
+{
+ drmModeDirtyFB(fd, fb_id, 0, 0);
+}
+
gfxstate *drm_init(const char *device, const char *output)
{
gfxstate *gfx;
@@ -240,6 +245,7 @@ gfxstate *drm_init(const char *device, const char *output)
gfx->restore_display = drm_restore_display;
gfx->cleanup_display = drm_cleanup_display;
+ gfx->flush_display = drm_flush_display;
return gfx;
}
diff --git a/fb-gui.c b/fb-gui.c
index 0080309..022d06d 100644
--- a/fb-gui.c
+++ b/fb-gui.c
@@ -101,6 +101,8 @@ void shadow_render(gfxstate *gfx)
shadow_render_line(gfx, i, gfx->mem + offset, shadow[i]);
sdirty[i] = 0;
}
+ if (gfx->flush_display)
+ gfx->flush_display();
}
void shadow_clear_lines(int first, int last)
diff --git a/gfx.h b/gfx.h
index 28b99b8..b328d49 100644
--- a/gfx.h
+++ b/gfx.h
@@ -16,4 +16,5 @@ struct gfxstate {
/* calls */
void (*restore_display)(void);
void (*cleanup_display)(void);
+ void (*flush_display)(void);
};