Changeset 86026 in webkit
- Timestamp:
- May 8, 2011 5:18:53 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r86025 r86026 1 2011-05-08 Jarkko Sakkinen <jarkko.j.sakkinen@gmail.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] GraphicsContext3D::getImageData() does not retrieve image data correctly 6 https://bugs.webkit.org/show_bug.cgi?id=58556 7 8 Tests: fast/canvas/webgl/gl-teximage.html 9 10 * platform/graphics/qt/GraphicsContext3DQt.cpp: 11 (WebCore::GraphicsContext3D::getImageData): 12 1 13 2011-05-07 Dan Bernstein <mitz@apple.com> 2 14 -
trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
r85526 r86026 31 31 #include "NotImplemented.h" 32 32 #include "QWebPageClient.h" 33 #include "SharedBuffer.h" 33 34 #include "qwebpage.h" 34 35 #include <QAbstractScrollArea> … … 1740 1741 if (!image) 1741 1742 return false; 1742 QPixmap* nativePixmap = image->nativeImageForCurrentFrame(); 1743 if (!nativePixmap) 1744 return false; 1745 1743 QImage nativeImage; 1744 // Is image already loaded? If not, load it. 1745 if (image->data()) 1746 nativeImage = QImage::fromData(reinterpret_cast<const uchar*>(image->data()->data()), image->data()->size()).convertToFormat(QImage::Format_ARGB32); 1747 else { 1748 QPixmap* nativePixmap = image->nativeImageForCurrentFrame(); 1749 nativeImage = nativePixmap->toImage().convertToFormat(QImage::Format_ARGB32); 1750 } 1746 1751 AlphaOp neededAlphaOp = AlphaDoNothing; 1747 if (!premultiplyAlpha) 1748 // FIXME: must fetch the image data before the premultiplication step 1749 neededAlphaOp = AlphaDoUnmultiply; 1750 QImage nativeImage = nativePixmap->toImage().convertToFormat(QImage::Format_ARGB32); 1752 if (premultiplyAlpha) 1753 neededAlphaOp = AlphaDoPremultiply; 1751 1754 outputVector.resize(nativeImage.byteCount()); 1752 return packPixels(nativeImage.rgbSwapped().bits(), SourceFormatRGBA8, image->width(), image->height(), 0, 1753 format, type, neededAlphaOp, outputVector.data()); 1755 return packPixels(nativeImage.bits(), SourceFormatBGRA8, image->width(), image->height(), 0, format, type, neededAlphaOp, outputVector.data()); 1754 1756 } 1755 1757
Note: See TracChangeset
for help on using the changeset viewer.