| 70 | |
| 71 | |
| 72 | void VirtualPixmap::readback(void) |
| 73 | { |
| 74 | if(!checkRenderMode()) return; |
| 75 | |
| 76 | fconfig_reloadenv(); |
| 77 | |
| 78 | CriticalSection::SafeLock l(mutex); |
| 79 | int width = oglDraw->getWidth(), height = oglDraw->getHeight(); |
| 80 | |
| 81 | rrframeheader hdr; |
| 82 | memset(&hdr, 0, sizeof(hdr)); |
| 83 | hdr.x = hdr.y = 0; |
| 84 | hdr.width = hdr.framew = width; |
| 85 | hdr.height = hdr.frameh = height; |
| 86 | frame->init(hdr); |
| 87 | |
| 88 | frame->flags |= FRAME_BOTTOMUP; |
| 89 | readPixels(0, 0, min(width, frame->hdr.framew), frame->pitch, |
| 90 | min(height, frame->hdr.frameh), GL_NONE, frame->pf, frame->bits, GL_FRONT, |
| 91 | false); |
| 92 | |
| 93 | frame->redraw(); |
| 94 | } |
nothing calls this directly
no test coverage detected