[Webkit-unassigned] [Bug 137793] Calling glReadPixels with BGRA format on an NVIDIA machine with an opaque context returns the wrong alpha values.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 17 11:39:15 PDT 2014


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

--- Comment #9 from Dean Jackson <dino at apple.com> ---
Comment on attachment 240001
  --> https://bugs.webkit.org/attachment.cgi?id=240001
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=240001&action=review

>> Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:72
>> +        for (int i = 0; i < totalBytes; i += 4)
> 
> e.g.
> vImage_Buffer src;
> src.height = height;
> src.width = width;
> src.rowBytes = srcBytesPerRow;
> src.data = srcRows;
> 
> vImage_Buffer dest;
> dest.height = height;
> dest.width = width;
> dest.rowBytes = destBytesPerRow;
> dest.data = destRows;
> 
> // Swap pixel channels from BGRA to RGBA.
> const uint8_t map[4] = { 2, 1, 0, 3 };
> vImagePermuteChannels_ARGB8888(&src, &dest, map, kvImageNoFlags);

Except you want the other way around :)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141017/c7f6fc48/attachment-0002.html>


More information about the webkit-unassigned mailing list