| 433 | ~FrameTest(void) { shutdown(); XDestroyWindow(dpy, win); } |
| 434 | |
| 435 | void dotest(int width, int height, int seed, PF *pf) |
| 436 | { |
| 437 | if(pf->bpc == 8) |
| 438 | { |
| 439 | Frame &frame = compressor->get(width, height, pf->id); |
| 440 | if(anaglyph) makeAnaglyph(frame, seed); |
| 441 | else initFrame(frame, seed); |
| 442 | // This unit test doesn't use winid, so use it to track the seed. |
| 443 | frame.hdr.winid = seed; |
| 444 | // This unit test doesn't use dpynum, so use it to track the source |
| 445 | // pixel format. |
| 446 | frame.hdr.dpynum = pf->id; |
| 447 | if(addLogo) frame.addLogo(); |
| 448 | compressor->put(frame); |
| 449 | } |
| 450 | else |
| 451 | { |
| 452 | FBXFrame *frame = (FBXFrame *)blitter->get(); |
| 453 | rrframeheader hdr; |
| 454 | memset(&hdr, 0, sizeof(rrframeheader)); |
| 455 | hdr.width = hdr.framew = width; |
| 456 | hdr.height = hdr.frameh = height; |
| 457 | frame->init(hdr); |
| 458 | if(anaglyph) makeAnaglyph(*frame, seed); |
| 459 | else initFrame(*frame, seed); |
| 460 | // This unit test doesn't use winid, so use it to track the seed. |
| 461 | frame->hdr.winid = seed; |
| 462 | // This unit test doesn't use dpynum, so use it to track the source |
| 463 | // pixel format. |
| 464 | frame->hdr.dpynum = pf->id; |
| 465 | if(addLogo) frame->addLogo(); |
| 466 | resizeWindow(dpy, win, width, height, myID); |
| 467 | blitter->put(frame); |
| 468 | } |
| 469 | } |
| 470 | |
| 471 | private: |
| 472 | |