[Webkit-unassigned] [Bug 21575] New: Cairo's ImageBuffer::getImageData() does not handle alpha=0 case correctly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 13 12:26:29 PDT 2008


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

           Summary: Cairo's ImageBuffer::getImageData() does not handle
                    alpha=0 case correctly
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: eroman at chromium.org
                CC: oliver at apple.com


Cairo buffer data is stored in ARGB, and the following loop in
ImageBufferCairo.cpp converts it to RGBA:

            if (unsigned int alpha = (*pixel & 0xff000000) >> 24) {
                destRows[basex] = (*pixel & 0x00ff0000) >> 16;
                destRows[basex + 1] = (*pixel & 0x0000ff00) >> 8;
                destRows[basex + 2] = (*pixel & 0x000000ff);
                destRows[basex + 3] = alpha;
            } else
                reinterpret_cast<uint32_t*>(destRows + basex)[0] = pixel[0];


The else clause looks suspicious, as it is assigning a ARGB value to where RGBA
is expected. So instead of RGB0 you get 0RGB.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list