• Tor Lillqvist's avatar
    tdf#92272: We need to twiddle the bytes from BGR to RGB · f96508f3
    Tor Lillqvist yazdı
    As far as I see, the surfaces created in the DX canvas are of
    D3DFMT_A8R8G8B8 or D3DFMT_X8R8G8B8 format, which means that the bytes
    (in memory order, on little-endian Windows) are B,G,R,A/X. So if the
    desired destination wants R,G,B,A, we need to swap the blue and red
    bytes.
    
    Let's hope this doesn't break anything else...
    
    Change-Id: I1b90d2cf95418f6557cac633ec6fce27599e8a61
    f96508f3
dx_surfacebitmap.cxx 21.7 KB