diff options
Diffstat (limited to 'recordmydesktop/src/rmd_update_image.c')
-rw-r--r-- | recordmydesktop/src/rmd_update_image.c | 93 |
1 files changed, 49 insertions, 44 deletions
diff --git a/recordmydesktop/src/rmd_update_image.c b/recordmydesktop/src/rmd_update_image.c index f7ee8d2..657868d 100644 --- a/recordmydesktop/src/rmd_update_image.c +++ b/recordmydesktop/src/rmd_update_image.c @@ -36,50 +36,55 @@ #include <X11/extensions/XShm.h> -void rmdUpdateImage(Display * dpy, - yuv_buffer *yuv, - DisplaySpecs *specs, - RectArea **root, - BRWindow *brwin, - EncData *enc, - char *datatemp, - int noshmem, - XShmSegmentInfo *shminfo, - int shm_opcode, - int no_quick_subsample){ - RectArea *temp; - unsigned char *dtap=(unsigned char*)datatemp; - temp=*root; +void rmdUpdateImage( Display * dpy, + yuv_buffer *yuv, + DisplaySpecs *specs, + RectArea **root, + BRWindow *brwin, + EncData *enc, + char *datatemp, + int noshmem, + XShmSegmentInfo *shminfo, + int shm_opcode, + int no_quick_subsample){ - if(temp!=NULL){ - do{ - if(noshmem){ - rmdGetZPixmap(dpy, - specs->root, - datatemp, - temp->rect.x, - temp->rect.y, - temp->rect.width, - temp->rect.height); - } - else{ - rmdGetZPixmapSHM(dpy, - specs->root, - shminfo, - shm_opcode, - datatemp,temp->rect.x, - temp->rect.y, - temp->rect.width, - temp->rect.height); - } - UPDATE_YUV_BUFFER(yuv,dtap,NULL, - (temp->rect.x-brwin->rrect.x+enc->x_offset), - (temp->rect.y-brwin->rrect.y+enc->y_offset), - (temp->rect.width),(temp->rect.height), - no_quick_subsample, - specs->depth); - temp=temp->next; - }while(temp!=NULL); - } + RectArea *temp; + unsigned char *dtap=(unsigned char*)datatemp; + temp=*root; + + if (temp!=NULL) { + do { + if (noshmem) { + rmdGetZPixmap( dpy, + specs->root, + datatemp, + temp->rect.x, + temp->rect.y, + temp->rect.width, + temp->rect.height); + } else { + rmdGetZPixmapSHM( dpy, + specs->root, + shminfo, + shm_opcode, + datatemp,temp->rect.x, + temp->rect.y, + temp->rect.width, + temp->rect.height); + } + + UPDATE_YUV_BUFFER( + yuv,dtap,NULL, + temp->rect.x-brwin->rrect.x+enc->x_offset, + temp->rect.y-brwin->rrect.y+enc->y_offset, + temp->rect.width, + temp->rect.height, + no_quick_subsample, + specs->depth + ); + + temp=temp->next; + } while (temp!=NULL); + } } |