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

version» Context lines:

pike.git/src/modules/Image/blit.c:1: - /* $Id: blit.c,v 1.40 2000/06/03 22:48:01 per Exp $ */ + /* $Id: blit.c,v 1.41 2000/06/11 21:07:21 per Exp $ */   #include "global.h"      /*   **! module Image   **! note - **! $Id: blit.c,v 1.40 2000/06/03 22:48:01 per Exp $ + **! $Id: blit.c,v 1.41 2000/06/11 21:07:21 per Exp $   **! class Image   */      #include <math.h>   #include <ctype.h>      #include "stralloc.h"   #include "global.h"   #include "pike_macros.h"   #include "object.h"
pike.git/src/modules/Image/blit.c:121:      /*** end internals ***/         void img_clear(rgb_group *dest,rgb_group rgb,INT32 size)   {    if(!size) return;    THREADS_ALLOW();    if( ( rgb.r == rgb.g && rgb.r == rgb.b ) )    MEMSET(dest, rgb.r, size*sizeof(rgb_group) ); - #ifdef ASSEMBLY_OK -  else if( size > 512 && (image_cpuid & IMAGE_MMX) ) -  { -  int *q = (int *)dest; -  /* 8 pixels, 24 bytes */ -  dest[0] = rgb; dest[1] = rgb; dest[2] = rgb; dest[3] = rgb; -  q[4] = q[0]; q[5] = q[1]; q[6] = q[2]; -  /* clear the rest the fast way.. */ -  image_clear_buffer_mmx_x86asm_from( dest, size/8 ); -  dest += size; size = size%8; dest -= size; -  while(size--) *(dest++) = rgb; -  } - #endif +     else if(size)    {    int increment = 1;    rgb_group *from = dest;    *(dest++)=rgb;    size -= 1;    while (size>increment)    {    MEMCPY(dest,from,increment*sizeof(rgb_group));    size-=increment,dest+=increment;