src/gui/painting/qdrawhelper.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
child 37 758a864f9613
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
  5012                 qt_memconvert(dest, src, copy_image_width);
  5012                 qt_memconvert(dest, src, copy_image_width);
  5013                 dest += copy_image_width;
  5013                 dest += copy_image_width;
  5014                 length -= copy_image_width;
  5014                 length -= copy_image_width;
  5015                 copy_image_width *= 2;
  5015                 copy_image_width *= 2;
  5016             }
  5016             }
  5017             qt_memconvert(dest, src, length);
  5017             if (length > 0)
       
  5018                 qt_memconvert(dest, src, length);
  5018         } else {
  5019         } else {
  5019             while (length) {
  5020             while (length) {
  5020                 int l = qMin(image_width - sx, length);
  5021                 int l = qMin(image_width - sx, length);
  5021                 if (buffer_size < l)
  5022                 if (buffer_size < l)
  5022                     l = buffer_size;
  5023                     l = buffer_size;
  7815 #endif // 3DNOW
  7816 #endif // 3DNOW
  7816 
  7817 
  7817 
  7818 
  7818 #ifdef QT_HAVE_SSE2
  7819 #ifdef QT_HAVE_SSE2
  7819         if (features & SSE2) {
  7820         if (features & SSE2) {
       
  7821             extern void QT_FASTCALL comp_func_SourceOver_sse2(uint *destPixels,
       
  7822                                                   const uint *srcPixels,
       
  7823                                                   int length,
       
  7824                                                   uint const_alpha);
       
  7825             extern void QT_FASTCALL comp_func_solid_SourceOver_sse2(uint *destPixels, int length, uint color, uint const_alpha);
       
  7826 
       
  7827             functionForModeAsm[0] = comp_func_SourceOver_sse2;
       
  7828             functionForModeSolidAsm[0] = comp_func_solid_SourceOver_sse2;
       
  7829 
  7820             extern void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl,
  7830             extern void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl,
  7821                                                      const uchar *srcPixels, int sbpl,
  7831                                                      const uchar *srcPixels, int sbpl,
  7822                                                      int w, int h,
  7832                                                      int w, int h,
  7823                                                      int const_alpha);
  7833                                                      int const_alpha);
  7824             extern void qt_blend_argb32_on_argb32_sse2(uchar *destPixels, int dbpl,
  7834             extern void qt_blend_argb32_on_argb32_sse2(uchar *destPixels, int dbpl,
  7825                                                        const uchar *srcPixels, int sbpl,
  7835                                                        const uchar *srcPixels, int sbpl,
  7826                                                        int w, int h,
  7836                                                        int w, int h,
  7827                                                        int const_alpha);
  7837                                                        int const_alpha);
  7828 
       
  7829 
  7838 
  7830             qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse2;
  7839             qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse2;
  7831             qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse2;
  7840             qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse2;
  7832             qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_sse2;
  7841             qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_sse2;
  7833             qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_sse2;
  7842             qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_sse2;
  7888             qTransformFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_transform_image_rgb16_on_rgb16_neon;
  7897             qTransformFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_transform_image_rgb16_on_rgb16_neon;
  7889 
  7898 
  7890             qDrawHelper[QImage::Format_RGB16].alphamapBlit = qt_alphamapblit_quint16_neon;
  7899             qDrawHelper[QImage::Format_RGB16].alphamapBlit = qt_alphamapblit_quint16_neon;
  7891 
  7900 
  7892             functionForMode_C[QPainter::CompositionMode_SourceOver] = qt_blend_argb32_on_argb32_scanline_neon;
  7901             functionForMode_C[QPainter::CompositionMode_SourceOver] = qt_blend_argb32_on_argb32_scanline_neon;
       
  7902             functionForModeSolid_C[QPainter::CompositionMode_SourceOver] = comp_func_solid_SourceOver_neon;
  7893             destFetchProc[QImage::Format_RGB16] = qt_destFetchRGB16_neon;
  7903             destFetchProc[QImage::Format_RGB16] = qt_destFetchRGB16_neon;
  7894             destStoreProc[QImage::Format_RGB16] = qt_destStoreRGB16_neon;
  7904             destStoreProc[QImage::Format_RGB16] = qt_destStoreRGB16_neon;
       
  7905 
       
  7906             qMemRotateFunctions[QImage::Format_RGB16][0] = qt_memrotate90_16_neon;
       
  7907             qMemRotateFunctions[QImage::Format_RGB16][2] = qt_memrotate270_16_neon;
  7895         }
  7908         }
  7896 #endif
  7909 #endif
  7897 
  7910 
  7898     if (functionForModeSolidAsm) {
  7911     if (functionForModeSolidAsm) {
  7899         const int destinationMode = QPainter::CompositionMode_Destination;
  7912         const int destinationMode = QPainter::CompositionMode_Destination;