| 142 | |
| 143 | |
| 144 | Frame *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 | |
| 173 | void ClientWin::drawFrame(Frame *f) |
no test coverage detected