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

Function checkWindowColor

server/fakerut.cpp:195–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193
194
195void checkWindowColor(Display *dpy, Window win, unsigned int color,
196 bool right = false)
197{
198 int fakerColor;
199 typedef int (*_vgl_getAutotestColorType)(Display *, Window, int);
200 _vgl_getAutotestColorType _vgl_getAutotestColor;
201
202 _vgl_getAutotestColor =
203 (_vgl_getAutotestColorType)dlsym(RTLD_DEFAULT, "_vgl_getAutotestColor");
204 if(!_vgl_getAutotestColor)
205 THROWNL("Can't communicate w/ faker");
206 fakerColor = _vgl_getAutotestColor(dpy, win, right);
207 if(fakerColor < 0 || fakerColor > 0xffffff)
208 THROWNL("Bogus data read back");
209 if((unsigned int)fakerColor != color)
210 {
211 if(right)
212 PRERROR2("R.buf is 0x%.6x, should be 0x%.6x", fakerColor, color)
213 else
214 PRERROR2("Color is 0x%.6x, should be 0x%.6x", fakerColor, color)
215 }
216}
217
218
219void checkFrame(Display *dpy, Window win, int desiredReadbacks, int &lastFrame)

Callers 6

readbackTestFunction · 0.70
readbackTestMSFunction · 0.70
flushTestFunction · 0.70
runMethod · 0.70
offScreenTestFunction · 0.70
subWinTestFunction · 0.70

Calls 1

_vgl_getAutotestColorFunction · 0.85

Tested by

no test coverage detected