mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
kdrive/fbdev: Use ShadowFB by default
It can be disabled by passing `-noshadow` to the command-line args Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This commit is contained in:
committed by
Enrico Weigelt
parent
5d3490d135
commit
cb445cef6b
@@ -35,6 +35,7 @@
|
||||
#endif
|
||||
|
||||
const char *fbdevDevicePath = NULL;
|
||||
Bool fbDisableShadow = FALSE;
|
||||
|
||||
static Bool
|
||||
fbdevInitialize(KdCardInfo * card, FbdevPriv * priv)
|
||||
@@ -345,11 +346,14 @@ fbdevMapFramebuffer(KdScreenInfo * screen)
|
||||
KdPointerMatrix m;
|
||||
FbdevPriv *priv = screen->card->driver;
|
||||
|
||||
if (scrpriv->randr != RR_Rotate_0 ||
|
||||
priv->fix.type != FB_TYPE_PACKED_PIXELS)
|
||||
if (!fbDisableShadow) {
|
||||
scrpriv->shadow = TRUE;
|
||||
else
|
||||
} else if (scrpriv->randr != RR_Rotate_0 ||
|
||||
priv->fix.type != FB_TYPE_PACKED_PIXELS) {
|
||||
scrpriv->shadow = TRUE;
|
||||
} else {
|
||||
scrpriv->shadow = FALSE;
|
||||
}
|
||||
|
||||
KdComputePointerMatrix(&m, scrpriv->randr, screen->width, screen->height);
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ typedef struct _fbdevScrPriv {
|
||||
|
||||
extern KdCardFuncs fbdevFuncs;
|
||||
extern const char *fbdevDevicePath;
|
||||
extern Bool fbDisableShadow;
|
||||
|
||||
Bool fbdevCardInit(KdCardInfo * card);
|
||||
|
||||
|
||||
@@ -68,6 +68,8 @@ ddxUseMsg(void)
|
||||
ErrorF("\nXfbdev Device Usage:\n");
|
||||
ErrorF
|
||||
("-fb path Framebuffer device to use. Defaults to /dev/fb0\n");
|
||||
ErrorF
|
||||
("-noshadow Disable the ShadowFB layer if possible\n");
|
||||
ErrorF("\n");
|
||||
}
|
||||
|
||||
@@ -83,6 +85,11 @@ ddxProcessArgument(int argc, char **argv, int i)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!strcmp(argv[i], "-noshadow")) {
|
||||
fbDisableShadow = TRUE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return KdProcessArgument(argc, argv, i);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user