Commit f41412b0 by Nicolas Capens Committed by Nicolas Capens

Fall back to the default visual if no X8R8G8B8.

Bug 18510357 Change-Id: I2406106482b8c65408df783ebb78f5abd17a6320 Reviewed-on: https://swiftshader-review.googlesource.com/1593Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 8d869e02
...@@ -51,8 +51,8 @@ namespace sw ...@@ -51,8 +51,8 @@ namespace sw
int depth = XDefaultDepth(x_display, screen); int depth = XDefaultDepth(x_display, screen);
Status status = XMatchVisualInfo(x_display, screen, 32, TrueColor, &x_visual); Status status = XMatchVisualInfo(x_display, screen, 32, TrueColor, &x_visual);
assert(status != 0 && x_visual.blue_mask == 0xFF); // Only X8R8G8B8 implemented bool match = (status != 0 && x_visual.blue_mask == 0xFF); // Prefer X8R8G8B8
Visual *visual = x_visual.visual; Visual *visual = match ? x_visual.visual : XDefaultVisual(x_display, screen);
mit_shm = (XShmQueryExtension(x_display) == True); mit_shm = (XShmQueryExtension(x_display) == True);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment