[PATCH 4/4] ephyr: Add -bitmap8 flag to specify 8 bpp for bitmaps

Keith Packard keithp at keithp.com
Mon Jan 13 18:00:39 PST 2014


This provides a way to test fb support for 8bpp bitmaps.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 hw/kdrive/ephyr/ephyr.c     | 3 +++
 hw/kdrive/ephyr/ephyrinit.c | 5 +++++
 2 files changed, 8 insertions(+)

diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index 12c7086..c9da870 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -62,6 +62,7 @@ typedef struct _EphyrInputPrivate {
 
 Bool EphyrWantGrayScale = 0;
 Bool EphyrWantResize = 0;
+Bool EphyrBitmap8 = 0;
 
 Bool
 host_has_extension(xcb_extension_t *extension)
@@ -638,6 +639,8 @@ ephyrInitScreen(ScreenPtr pScreen)
     hostx_set_win_title(screen, "(ctrl+shift grabs mouse and keyboard)");
     pScreen->CreateColormap = ephyrCreateColormap;
 
+    fbSetBitmap8bpp(pScreen, EphyrBitmap8);
+
 #ifdef XV
     if (!ephyrNoXV) {
         if (!ephyrInitVideo(pScreen)) {
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index 3230e70..0dbf7eb 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -33,6 +33,7 @@
 extern Window EphyrPreExistingHostWin;
 extern Bool EphyrWantGrayScale;
 extern Bool EphyrWantResize;
+extern Bool EphyrBitmap8;
 extern Bool kdHasPointer;
 extern Bool kdHasKbd;
 
@@ -310,7 +311,11 @@ ddxProcessArgument(int argc, char **argv, int i)
              !strcmp(argv[i], "-class") ||
              !strcmp(argv[i], "-geometry") || !strcmp(argv[i], "-scrns")) {
         return 2;
+    } else if (!strcmp(argv[i], "-bitmap8")) {
+        EphyrBitmap8 = TRUE;
+        return 1;
     }
+
     /* end Xnest compat */
 
     return KdProcessArgument(argc, argv, i);
-- 
1.8.5.2



More information about the xorg-devel mailing list