src/video/SDL_blit_N.c
changeset 6304 9821f5c9b7bd
parent 6295 a2c60beb6115
child 6410 f6c0a9462662
equal deleted inserted replaced
6303:6bb657898f55 6304:9821f5c9b7bd
   706         /* do scalar until we can align... */
   706         /* do scalar until we can align... */
   707         while ((UNALIGNED_PTR(dst)) && (width)) {
   707         while ((UNALIGNED_PTR(dst)) && (width)) {
   708             bits = *(src++);
   708             bits = *(src++);
   709             RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
   709             RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
   710             if(!srcfmt->Amask)
   710             if(!srcfmt->Amask)
   711               a = srcfmt->alpha;
   711               a = info->a;
   712             *(dst++) = MAKE8888(dstfmt, r, g, b, a);
   712             *(dst++) = MAKE8888(dstfmt, r, g, b, a);
   713             width--;
   713             width--;
   714         }
   714         }
   715 
   715 
   716         /* After all that work, here's the vector part! */
   716         /* After all that work, here's the vector part! */
   735         /* cover pixels at the end of the row that didn't fit in 16 bytes. */
   735         /* cover pixels at the end of the row that didn't fit in 16 bytes. */
   736         while (extrawidth) {
   736         while (extrawidth) {
   737             bits = *(src++);    /* max 7 pixels, don't bother with prefetch. */
   737             bits = *(src++);    /* max 7 pixels, don't bother with prefetch. */
   738             RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
   738             RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
   739             if(!srcfmt->Amask)
   739             if(!srcfmt->Amask)
   740               a = srcfmt->alpha;
   740               a = info->a;
   741             *(dst++) = MAKE8888(dstfmt, r, g, b, a);
   741             *(dst++) = MAKE8888(dstfmt, r, g, b, a);
   742             extrawidth--;
   742             extrawidth--;
   743         }
   743         }
   744 
   744 
   745         src += srcskip;
   745         src += srcskip;
   793             vec_dstst(dst + scalar_dst_lead, DST_CTRL(2, 32, 1024),
   793             vec_dstst(dst + scalar_dst_lead, DST_CTRL(2, 32, 1024),
   794                       DST_CHAN_DEST);
   794                       DST_CHAN_DEST);
   795             bits = *(src++);
   795             bits = *(src++);
   796             RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
   796             RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
   797             if(!srcfmt->Amask)
   797             if(!srcfmt->Amask)
   798               a = srcfmt->alpha;
   798               a = info->a;
   799             *(dst++) = MAKE8888(dstfmt, r, g, b, a);
   799             *(dst++) = MAKE8888(dstfmt, r, g, b, a);
   800             width--;
   800             width--;
   801         }
   801         }
   802 
   802 
   803         /* After all that work, here's the vector part! */
   803         /* After all that work, here's the vector part! */
   826         /* cover pixels at the end of the row that didn't fit in 16 bytes. */
   826         /* cover pixels at the end of the row that didn't fit in 16 bytes. */
   827         while (extrawidth) {
   827         while (extrawidth) {
   828             bits = *(src++);    /* max 7 pixels, don't bother with prefetch. */
   828             bits = *(src++);    /* max 7 pixels, don't bother with prefetch. */
   829             RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
   829             RGBA_FROM_8888(bits, srcfmt, r, g, b, a);
   830             if(!srcfmt->Amask)
   830             if(!srcfmt->Amask)
   831               a = srcfmt->alpha;
   831               a = info->a;
   832             *(dst++) = MAKE8888(dstfmt, r, g, b, a);
   832             *(dst++) = MAKE8888(dstfmt, r, g, b, a);
   833             extrawidth--;
   833             extrawidth--;
   834         }
   834         }
   835 
   835 
   836         src += srcskip;
   836         src += srcskip;