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

Function checkWindowColor

server/eglxfakerut.cpp:177–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175
176
177void checkWindowColor(Display *dpy, Window win, unsigned int color)
178{
179 int fakerColor;
180 typedef int (*_vgl_getAutotestColorType)(Display *, Window, int);
181 _vgl_getAutotestColorType _vgl_getAutotestColor;
182
183 _vgl_getAutotestColor =
184 (_vgl_getAutotestColorType)dlsym(RTLD_DEFAULT, "_vgl_getAutotestColor");
185 if(!_vgl_getAutotestColor)
186 THROWNL("Can't communicate w/ faker");
187 fakerColor = _vgl_getAutotestColor(dpy, win, 0);
188 if(fakerColor < 0 || fakerColor > 0xffffff)
189 THROWNL("Bogus data read back");
190 if((unsigned int)fakerColor != color)
191 PRERROR2("Color is 0x%.6x, should be 0x%.6x", fakerColor, color)
192}
193
194
195void checkFrame(Display *dpy, Window win, int desiredReadbacks, int &lastFrame)

Callers 3

readbackTestFunction · 0.70
runMethod · 0.70
offScreenTestFunction · 0.70

Calls 1

_vgl_getAutotestColorFunction · 0.85

Tested by

no test coverage detected