diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp b/Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp index e1b275893..734a093ae 100644 --- a/Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp +++ b/Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp @@ -52,7 +52,8 @@ PassRefPtr<Image> GraphicsSurface::createReadOnlyImage(const IntRect& rect) int stride; QImage::Format format = (flags() & SupportsAlpha) ? QImage::Format_ARGB32_Premultiplied : QImage::Format_RGB32; char* data = platformLock(rect, &stride, RetainPixels | ReadOnly); - return BitmapImage::create(new QImage(reinterpret_cast<uchar*>(data), rect.width(), rect.height(), stride, format, didReleaseImage, this)); + QImage image(reinterpret_cast<uchar*>(data), rect.width(), rect.height(), stride, format, didReleaseImage, this); + return BitmapImage::create(new QPixmap(QPixmap::fromImage(image))); } } |