Changeset 89115 in webkit


Ignore:
Timestamp:
Jun 16, 2011 10:07:52 PM (13 years ago)
Author:
kevino@webkit.org
Message:

Reviewed by Kevin Ollivier.

[wx] Account for differing byte order when decoding images in the PPC build.

https://bugs.webkit.org/show_bug.cgi?id=62830

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r89096 r89115  
     12011-06-16  Robin Dunn  <robin@alldunn.com>
     2
     3        Reviewed by Kevin Ollivier.
     4
     5        [wx] Account for differing byte order when decoding images in the PPC build.
     6       
     7        https://bugs.webkit.org/show_bug.cgi?id=62830
     8
     9        * platform/image-decoders/wx/ImageDecoderWx.cpp:
     10        (WebCore::ImageFrame::asNewNativeImage):
     11
    1122011-06-16  Darin Adler  <darin@apple.com>
    213
  • trunk/Source/WebCore/platform/image-decoders/wx/ImageDecoderWx.cpp

    r75748 r89115  
    5555        WxPixelData::Iterator rowStart = p;
    5656        for (size_t i = 0; i < m_size.width() * m_size.height() * sizeof(PixelData); i += sizeof(PixelData)) {
    57                 p.Red() = bytes[i + 2];
    58                 p.Green() = bytes[i + 1];
    59                 p.Blue() = bytes[i + 0];
    60                 p.Alpha() = bytes[i + 3];
    61            
     57#if CPU(BIG_ENDIAN)
     58            p.Alpha() = bytes[i + 3];
     59            p.Red() = bytes[i + 2];
     60            p.Green() = bytes[i + 1];
     61            p.Blue() = bytes[i + 0];
     62#else
     63            p.Alpha() = bytes[i + 0];
     64            p.Red() = bytes[i + 1];
     65            p.Green() = bytes[i + 2];
     66            p.Blue() = bytes[i + 3];
     67#endif
    6268            p++;
    6369
Note: See TracChangeset for help on using the changeset viewer.