pike.git / src / modules / Image / blit.c

version» Context lines:

pike.git/src/modules/Image/blit.c:122:    if( ( rgb.r == rgb.g && rgb.r == rgb.b ) )    memset(dest, rgb.r, size*sizeof(rgb_group) );    else if(size)    {    int increment = 1;    rgb_group *from = dest;    *(dest++)=rgb;    size -= 1;    while (size>increment)    { -  MEMCPY(dest,from,increment*sizeof(rgb_group)); +  memcpy(dest,from,increment*sizeof(rgb_group));    size-=increment,dest+=increment;    if (increment<1024) increment *= 2;    } -  if(size>0) MEMCPY(dest,from,size*sizeof(rgb_group)); +  if(size>0) memcpy(dest,from,size*sizeof(rgb_group));    }    THREADS_DISALLOW();   }      void img_box_nocheck(INT32 x1,INT32 y1,INT32 x2,INT32 y2)   {    INT32 x,mod;    rgb_group *foo,*end,rgb;    struct image *this;   
pike.git/src/modules/Image/blit.c:155:    if(!mod)    img_clear(foo,rgb,end-foo);    else {    THREADS_ALLOW();    do {    int length = x2-x1+1, xs=this->xsize, y=y2-y1+1;    rgb_group *from = foo;    if(!length)    break; /* Break to the while(0). */    for(x=0; x<length; x++) *(foo+x) = rgb; -  while(--y) MEMCPY((foo+=xs), from, length*sizeof(rgb_group)); +  while(--y) memcpy((foo+=xs), from, length*sizeof(rgb_group));    } while(0);    THREADS_DISALLOW();    }    }    else    {    THREADS_ALLOW();    do {    for (; foo<end; foo+=mod)    for (x=x1; x<=x2; x++,foo++)
pike.git/src/modules/Image/blit.c:182:      void img_blit(rgb_group *dest,rgb_group *src,INT32 width,    INT32 lines,INT32 moddest,INT32 modsrc)   {    if(width <= 0 || lines <= 0)    return;   CHRONO("image_blit begin");       THREADS_ALLOW();    if(!moddest && !modsrc) -  MEMCPY(dest,src,sizeof(rgb_group)*width*lines); +  memcpy(dest,src,sizeof(rgb_group)*width*lines);    else    while (lines--)    { -  MEMCPY(dest,src,sizeof(rgb_group)*width); +  memcpy(dest,src,sizeof(rgb_group)*width);    dest+=moddest;    src+=modsrc;    }    THREADS_DISALLOW();   CHRONO("image_blit end");      }      void img_crop(struct image *dest,    struct image *img,
pike.git/src/modules/Image/blit.c:215:    if (x1>x2) tmp=x1, x1=x2, x2=tmp;    if (y1>y2) tmp=y1, y1=y2, y2=tmp;       new=xalloc( (x2-x1+1)*(y2-y1+1)*sizeof(rgb_group)+RGB_VEC_PAD );       if (x1==0 && y1==0 &&    img->xsize-1==x2 && img->ysize-1==y2)    {    *dest=*img;    THREADS_ALLOW(); -  MEMCPY(new,img->img,(x2-x1+1)*(y2-y1+1)*sizeof(rgb_group)); +  memcpy(new,img->img,(x2-x1+1)*(y2-y1+1)*sizeof(rgb_group));    THREADS_DISALLOW();    dest->img=new;    return;    }       img_clear(new,THIS->rgb,(x2-x1+1)*(y2-y1+1));       dest->xsize=x2-x1+1;    dest->ysize=y2-y1+1;   
pike.git/src/modules/Image/blit.c:254:       }    dest->img=new;   }      void img_clone(struct image *newimg,struct image *img)   {    if (newimg->img) free(newimg->img);    newimg->img=xalloc(sizeof(rgb_group)*img->xsize*img->ysize+RGB_VEC_PAD);    THREADS_ALLOW(); -  MEMCPY(newimg->img,img->img,sizeof(rgb_group)*img->xsize*img->ysize); +  memcpy(newimg->img,img->img,sizeof(rgb_group)*img->xsize*img->ysize);    THREADS_DISALLOW();    newimg->xsize=img->xsize;    newimg->ysize=img->ysize;    newimg->rgb=img->rgb;   }      /*   **! method object paste(object image)   **! method object paste(object image,int x,int y)   **! Pastes a given image over the current image.