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

Method readback

server/VirtualPixmap.cpp:72–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70
71
72void 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}

Callers

nothing calls this directly

Calls 7

fconfig_reloadenvFunction · 0.85
readPixelsFunction · 0.85
minFunction · 0.50
getWidthMethod · 0.45
getHeightMethod · 0.45
initMethod · 0.45
redrawMethod · 0.45

Tested by

no test coverage detected