diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-05-16 13:45:16 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-16 14:26:17 +0200 |
commit | f9f9277b9c39d4c34f23c99f5e4bbc5a56c3f3da (patch) | |
tree | 0c2bd45c4c8fe61804b560c866a8fe4aa5562275 /Source/JavaScriptCore/API/JSStringRef.h | |
parent | 26e6818bad39d90cff38583971d29de89051d9ae (diff) | |
download | qtwebkit-f9f9277b9c39d4c34f23c99f5e4bbc5a56c3f3da.tar.gz |
[Qt] RGB -> BGR is wrong on big endian
https://bugs.webkit.org/show_bug.cgi?id=107560
Reviewed by Jocelyn Turcotte.
Replace the conversion to methods that make it clearer what is going on.
The routines are also optimized compared to the existing by avoiding going
over slow Color constructor.
Tested by existing tests in canvas and fast/canvas.
* platform/graphics/Color.cpp:
(WebCore::colorFromPremultipliedARGB):
Cleanup.
(WebCore::premultipliedARGBFromColor):
Cleanup and correct for alpha = 0.
* platform/graphics/Color.h:
(WebCore):
* platform/graphics/qt/ImageBufferQt.cpp:
(WebCore::copyColorToRGBA):
(WebCore::copyRGBAToColor):
(WebCore::getImageData):
(WebCore::ImageBuffer::putByteArray):
Change-Id: I8948ad3376610a42374ece6b96d4a1be9c15c198
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'Source/JavaScriptCore/API/JSStringRef.h')
0 files changed, 0 insertions, 0 deletions