mirror of
https://github.com/brl/mutter.git
synced 2024-11-27 02:20:43 -05:00
[x11] Do not needlessly check XVisualInfo
Since we are destroying any previously set VisualInfo we keep we know for sure that stage->xvisinfo is going to be None; hence, no reason to check this condition.
This commit is contained in:
parent
0acb98e987
commit
9582fddb24
@ -126,25 +126,23 @@ clutter_stage_glx_realize (ClutterActor *actor)
|
||||
{
|
||||
GLX_RGBA,
|
||||
GLX_DOUBLEBUFFER,
|
||||
GLX_RED_SIZE, 1,
|
||||
GLX_GREEN_SIZE, 1,
|
||||
GLX_BLUE_SIZE, 1,
|
||||
GLX_RED_SIZE, 1,
|
||||
GLX_GREEN_SIZE, 1,
|
||||
GLX_BLUE_SIZE, 1,
|
||||
GLX_STENCIL_SIZE, 1,
|
||||
0
|
||||
};
|
||||
|
||||
if (stage_x11->xvisinfo)
|
||||
if (stage_x11->xvisinfo != None)
|
||||
{
|
||||
XFree (stage_x11->xvisinfo);
|
||||
stage_x11->xvisinfo = None;
|
||||
}
|
||||
|
||||
/* The following check seems strange */
|
||||
stage_x11->xvisinfo = glXChooseVisual (stage_x11->xdpy,
|
||||
stage_x11->xscreen,
|
||||
gl_attributes);
|
||||
if (stage_x11->xvisinfo == None)
|
||||
stage_x11->xvisinfo = glXChooseVisual (stage_x11->xdpy,
|
||||
stage_x11->xscreen,
|
||||
gl_attributes);
|
||||
if (!stage_x11->xvisinfo)
|
||||
{
|
||||
g_critical ("Unable to find suitable GL visual.");
|
||||
goto fail;
|
||||
|
Loading…
Reference in New Issue
Block a user