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

Function checkFrame

server/eglxfakerut.cpp:195–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193
194
195void checkFrame(Display *dpy, Window win, int desiredReadbacks, int &lastFrame)
196{
197 int frame;
198 typedef int (*_vgl_getAutotestFrameType)(Display *, Window);
199 _vgl_getAutotestFrameType _vgl_getAutotestFrame;
200
201 _vgl_getAutotestFrame =
202 (_vgl_getAutotestFrameType)dlsym(RTLD_DEFAULT, "_vgl_getAutotestFrame");
203 if(!_vgl_getAutotestFrame)
204 THROWNL("Can't communicate w/ faker");
205 frame = _vgl_getAutotestFrame(dpy, win);
206 if(frame < 1)
207 THROWNL("Can't communicate w/ faker");
208 if(frame - lastFrame != desiredReadbacks && desiredReadbacks >= 0)
209 PRERROR3("Expected %d readback%s, not %d", desiredReadbacks,
210 desiredReadbacks == 1 ? "" : "s", frame - lastFrame);
211 lastFrame = frame;
212}
213
214
215void checkCurrent(EGLDisplay edpy, EGLSurface draw, EGLSurface read,

Callers 3

readbackTestFunction · 0.70
runMethod · 0.70
offScreenTestFunction · 0.70

Calls 1

_vgl_getAutotestFrameFunction · 0.85

Tested by

no test coverage detected