Ignore:
Timestamp:
Jul 16, 2003, 12:46:18 PM (22 years ago)
Author:
sandervl
Message:

DT: Fix for partial blits in StretchDIBits; optimized rgb conversion calls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gdi32/blit.cpp

    r10059 r10167  
    1 /* $Id: blit.cpp,v 1.44 2003-05-02 15:32:27 sandervl Exp $ */
     1/* $Id: blit.cpp,v 1.45 2003-07-16 10:46:16 sandervl Exp $ */
    22
    33/*
     
    183183
    184184        newbits = (WORD *)malloc(imgsize);
    185         if(CPUFeatures & CPUID_MMX) {
    186              RGB555to565MMX(newbits, (WORD *)bits, imgsize/sizeof(WORD));
    187         }
    188         else
    189           RGB555to565(newbits, (WORD *)bits, imgsize/sizeof(WORD));
     185        pRGB555to565(newbits, (WORD *)bits, imgsize/sizeof(WORD));
    190186        bits = newbits;
    191187    }
     
    469465        break;
    470466    }
     467
    471468    if(bitfields[1] == RGB555_GREEN_MASK)
    472469    {//RGB 555?
     
    474471
    475472        ULONG imgsize = CalcBitmapSize(info->bmiHeader.biBitCount,
    476                                      widthSrc, heightSrc);
     473                                     abs(info->bmiHeader.biWidth), heightSrc);
    477474        ULONG offset = CalcBitmapSize(info->bmiHeader.biBitCount,
    478                                      xSrc, ySrc)/sizeof(WORD);
     475                                     abs(info->bmiHeader.biWidth), ySrc)/sizeof(WORD);
    479476        newbits = (WORD *) HeapAlloc(GetProcessHeap(), 0, imgsize);
    480 //bugbug (too much)
    481 //bugbug
    482         if(CPUFeatures & CPUID_MMX) {
    483              RGB555to565MMX(newbits, (WORD *)bits+offset, imgsize/sizeof(WORD));
    484         }
    485         else
    486           RGB555to565(newbits, (WORD *)bits+offset, imgsize/sizeof(WORD));
     477
     478        //we still convert too much
     479        pRGB555to565(newbits, (WORD *)bits+offset, imgsize/sizeof(WORD));
    487480        bits = newbits;
     481
     482        ySrc = 0;
    488483    }
    489484    //SvL: Ignore BI_BITFIELDS type (StretchDIBits fails otherwise)
Note: See TracChangeset for help on using the changeset viewer.