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

Method addLogo

common/Frame.cpp:345–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343
344
345void Frame::addLogo(void)
346{
347 unsigned char *rowptr, *logoptr = vgllogo, *logoptr2;
348
349 if(!bits || hdr.width < 1 || hdr.height < 1) return;
350
351 int height = min(VGLLOGO_HEIGHT, hdr.height - 1);
352 int width = min(VGLLOGO_WIDTH, hdr.width - 1);
353 int stride = flags & FRAME_BOTTOMUP ? -pitch : pitch;
354 if(height < 1 || width < 1) return;
355 if(flags & FRAME_BOTTOMUP)
356 rowptr = &bits[pitch * height + (hdr.width - width - 1) * pf->size];
357 else
358 rowptr = &bits[pitch * (hdr.height - height - 1) +
359 (hdr.width - width - 1) * pf->size];
360 DRAWLOGO()
361
362 if(!rbits) return;
363 logoptr = vgllogo;
364 if(flags & FRAME_BOTTOMUP)
365 rowptr = &rbits[pitch * height + (hdr.width - width - 1) * pf->size];
366 else
367 rowptr = &rbits[pitch * (hdr.height - height - 1) +
368 (hdr.width - width - 1) * pf->size];
369 logoptr = vgllogo;
370 DRAWLOGO()
371}
372
373
374void Frame::dumpHeader(rrframeheader &h)

Callers 5

sendPluginMethod · 0.80
sendVGLMethod · 0.80
sendX11Method · 0.80
sendXVMethod · 0.80
dotestMethod · 0.80

Calls 1

minFunction · 0.50

Tested by

no test coverage detected