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

Function fconfig_setcompress

server/fakerconfig.cpp:586–603  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584
585
586void fconfig_setcompress(FakerConfig &fc, int i)
587{
588 if(i < 0 || (i >= RR_COMPRESSOPT && strlen(fc.transport) == 0)) return;
589 CriticalSection::SafeLock l(fcmutex);
590
591 bool is = (fc.compress >= 0);
592 fc.compress = i;
593 if(strlen(fc.transport) > 0) return;
594 if(!is) fc.transvalid[_Trans[fc.compress]] = fc.transvalid[RRTRANS_X11] = 1;
595 if(fc.subsamp < 0) fc.subsamp = _Defsubsamp[fc.compress];
596 if(strlen(fc.transport) == 0 && _Minsubsamp[fc.compress] >= 0
597 && _Maxsubsamp[fc.compress] >= 0)
598 {
599 if(fc.subsamp < _Minsubsamp[fc.compress]
600 || fc.subsamp > _Maxsubsamp[fc.compress])
601 fc.subsamp = _Defsubsamp[fc.compress];
602 }
603}
604
605
606void fconfig_setprobeglxfromdpy(Display *dpy)

Callers 5

fconfig_reloadenvFunction · 0.85
mainFunction · 0.85
compCBFunction · 0.85
profCBFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected