MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / getHighestScoringVisualID

Function getHighestScoringVisualID

server/glxvisual.cpp:1094–1114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1092
1093
1094VisualID getHighestScoringVisualID(Display *dpy, int screen)
1095{
1096 if(!dpy) return 0;
1097
1098 int highestScore = -1;
1099 VisualID bestVisualID =
1100 matchVisual2D(dpy, screen, 32, TrueColor, 8, 0, true);
1101
1102 GET_VA_TABLE();
1103
1104 for(int i = 0; i < vaEntries; i++)
1105 {
1106 if(va[i].score > highestScore)
1107 {
1108 highestScore = va[i].score;
1109 bestVisualID = va[i].visualID;
1110 }
1111 }
1112
1113 return bestVisualID;
1114}
1115
1116} // namespace

Callers 2

getVisualFromConfigFunction · 0.85
buildCfgAttribTableFunction · 0.85

Calls 1

matchVisual2DFunction · 0.85

Tested by

no test coverage detected