summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-01-12 05:43:33 -0800
committerKeith Packard <keithp@keithp.com>2014-01-22 10:36:01 -0800
commit82af1012f0893c689639084e0f2aefafdb340847 (patch)
tree39c6e9ac58a507ee4a58a131f88293a044c74729
parentf82a741d6017627eb66f5b73ffe032c1f37b7463 (diff)
ephyr: Add -bitmap8 and -bitmap32 flag to specify bpp for bitmapsdepth1
This provides a way to test fb support for 8- and 32- bpp bitmaps. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--hw/kdrive/ephyr/ephyr.c3
-rw-r--r--hw/kdrive/ephyr/ephyrinit.c8
2 files changed, 11 insertions, 0 deletions
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index 12c708616..0b04d6043 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 EphyrBitmapBpp = 1;
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;
+ fbSetBitmapBpp(pScreen, EphyrBitmapBpp);
+
#ifdef XV
if (!ephyrNoXV) {
if (!ephyrInitVideo(pScreen)) {
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index 3230e707e..eb84bf33d 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 EphyrBitmapBpp;
extern Bool kdHasPointer;
extern Bool kdHasKbd;
@@ -310,7 +311,14 @@ 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")) {
+ EphyrBitmapBpp = 8;
+ return 1;
+ } else if (!strcmp(argv[i], "-bitmap32")) {
+ EphyrBitmapBpp = 32;
+ return 1;
}
+
/* end Xnest compat */
return KdProcessArgument(argc, argv, i);