Change default visual to have a depth of bitsPerPixel.
This results in the default visual including alpha in the depth.
This is the behavour expected by the xorg render implementation, so appears
to be reasonably standard.
(cherry picked from commit c0bc3fb1f9a1a975c060d6db381498a2e2126a53)
From: git://anongit.freedesktop.org/xorg/driver/xf86-video-armsoc
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium:330669
TEST=DISPLAY=:0 xdpyinfo
depth of root window: 32 planes
...
number of visuals: 2
default visual id: 0x21
visual:
visual id: 0x21
class: TrueColor
depth: 32 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
visual:
visual id: 0x22
class: DirectColor
depth: 32 planes
available colormap entries: 256 per subfield
red, green, blue masks: 0xff0000, 0xff00, 0xff
significant bits in color specification: 8 bits
Change-Id: Iacb8a2bf0689c90c9ab3767087d54752779090e5
Reviewed-on: https://chromium-review.googlesource.com/183605
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
diff --git a/src/omap_driver.c b/src/omap_driver.c
index 8430e2c..f91c2a1 100644
--- a/src/omap_driver.c
+++ b/src/omap_driver.c
@@ -591,7 +591,7 @@
*/
miClearVisualTypes();
- if (!miSetVisualTypes(pScrn->depth, miGetDefaultVisualMask(pScrn->depth),
+ if (!miSetVisualTypes(pScrn->bitsPerPixel, miGetDefaultVisualMask(pScrn->depth),
pScrn->rgbBits, pScrn->defaultVisual)) {
ERROR_MSG("Cannot initialize the visual type for %d bits per pixel!",
pScrn->bitsPerPixel);