[openchrome-devel] xf86-video-openchrome: src/via_driver.c

Kevin Brace kevinbrace at kemper.freedesktop.org
Wed Dec 18 02:32:01 UTC 2019


 src/via_driver.c |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

New commits:
commit 036cd0bfdf5fc504a5d9840cab1c2e0ce0aeb61d
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Tue Dec 17 20:31:22 2019 -0600

    Call miSetVisualTypes() inside VIAScreenInit() only at one location
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_driver.c b/src/via_driver.c
index 94fc90a..a1a46b8 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -1847,15 +1847,11 @@ VIAScreenInit(SCREEN_INIT_ARGS_DECL)
 
     miClearVisualTypes();
 
-    if (pScrn->bitsPerPixel > 8 && !pVia->IsSecondary) {
-        if (!miSetVisualTypes(pScrn->depth, TrueColorMask,
-                              pScrn->rgbBits, pScrn->defaultVisual))
-            return FALSE;
-    } else {
-        if (!miSetVisualTypes(pScrn->depth,
-                              miGetDefaultVisualMask(pScrn->depth),
-                              pScrn->rgbBits, pScrn->defaultVisual))
-            return FALSE;
+    if (!miSetVisualTypes(pScrn->depth,
+            (pScrn->bitsPerPixel > 8) && (!pVia->IsSecondary) ?
+                TrueColorMask : miGetDefaultVisualMask(pScrn->depth),
+            pScrn->rgbBits, pScrn->defaultVisual)) {
+        return FALSE;
     }
 
     if (!miSetPixmapDepths()) {


More information about the openchrome-devel mailing list