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

Method getFrame

client/ClientWin.cpp:144–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142
143
144Frame *ClientWin::getFrame(bool useXV)
145{
146 Frame *f = NULL;
147
148 if(thread) thread->checkError();
149 cfmutex.lock();
150 #ifdef USEXV
151 if(useXV)
152 {
153 if(!xvframes[cfindex])
154 {
155 char dpystr[80];
156 snprintf(dpystr, 80, ":%d.0", dpynum);
157 xvframes[cfindex] = new XVFrame(dpystr, window);
158 if(!xvframes[cfindex]) THROW("Could not allocate class instance");
159 }
160 f = (Frame *)xvframes[cfindex];
161 }
162 else
163 #endif
164 f = (Frame *)&cframes[cfindex];
165 cfindex = (cfindex + 1) % NFRAMES;
166 cfmutex.unlock();
167 f->waitUntilComplete();
168 if(thread) thread->checkError();
169 return f;
170}
171
172
173void ClientWin::drawFrame(Frame *f)

Callers 1

runMethod · 0.45

Calls 4

checkErrorMethod · 0.80
waitUntilCompleteMethod · 0.80
lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected