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

Method getFrame

server/XVTrans.cpp:102–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100
101
102XVFrame *XVTrans::getFrame(Display *dpy, Window win, int width, int height)
103{
104 XVFrame *f = NULL;
105
106 if(thread) thread->checkError();
107 {
108 CriticalSection::SafeLock l(mutex);
109
110 int index = -1;
111 for(int i = 0; i < NFRAMES; i++)
112 if(!frames[i] || (frames[i] && frames[i]->isComplete()))
113 index = i;
114 if(index < 0) THROW("No free buffers in pool");
115 if(!frames[index])
116 frames[index] = new XVFrame(dpy, win);
117 f = frames[index]; f->waitUntilComplete();
118 }
119
120 rrframeheader hdr;
121 memset(&hdr, 0, sizeof(hdr));
122 hdr.x = hdr.y = 0;
123 hdr.width = hdr.framew = width;
124 hdr.height = hdr.frameh = height;
125 f->init(hdr);
126 return f;
127}
128
129
130bool XVTrans::isReady(void)

Callers 8

sendPluginMethod · 0.45
sendVGLMethod · 0.45
sendX11Method · 0.45
sendXVMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45
RRTransGetFrameFunction · 0.45
RRTransGetFrameFunction · 0.45

Calls 4

checkErrorMethod · 0.80
isCompleteMethod · 0.80
waitUntilCompleteMethod · 0.80
initMethod · 0.45

Tested by 2

RRTransGetFrameFunction · 0.36
RRTransGetFrameFunction · 0.36