diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-17 16:21:14 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-17 16:21:14 +0200 |
commit | 8995b83bcbfbb68245f779b64e5517627c6cc6ea (patch) | |
tree | 17985605dab9263cc2444bd4d45f189e142cca7c /Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp | |
parent | b9c9652036d5e9f1e29c574f40bc73a35c81ace6 (diff) |
Imported WebKit commit cf4f8fc6f19b0629f51860cb2d4b25e139d07e00 (http://svn.webkit.org/repository/webkit/trunk@131592)
New snapshot that includes the build fixes for Mac OS X 10.6 and earlier as well
as the previously cherry-picked changes
Diffstat (limited to 'Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp index 5c8a3ae24..c2ab6dfb0 100644 --- a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp +++ b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp @@ -283,12 +283,13 @@ GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate(QPainter* p, cons GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate() { + delete shadow; + if (!platformContextIsOwned) return; QPaintDevice* device = painter->device(); painter->end(); - delete shadow; delete painter; delete device; } @@ -1066,7 +1067,7 @@ void GraphicsContext::clearPlatformShadow() m_data->shadow->clear(); } -void GraphicsContext::pushTransparencyLayerInternal(const QRect &rect, qreal opacity, QImage& alphaMask) +void GraphicsContext::pushTransparencyLayerInternal(const QRect &rect, qreal opacity, QPixmap& alphaMask) { QPainter* p = m_data->p(); @@ -1101,7 +1102,7 @@ void GraphicsContext::beginPlatformTransparencyLayer(float opacity) h = int(qBound(qreal(0), deviceClip.height(), (qreal)h) + 2); } - QImage emptyAlphaMask; + QPixmap emptyAlphaMask; m_data->layers.push(new TransparencyLayer(p, QRect(x, y, w, h), opacity, emptyAlphaMask)); ++m_data->layerCount; } @@ -1115,7 +1116,7 @@ void GraphicsContext::endPlatformTransparencyLayer() if (!layer->alphaMask.isNull()) { layer->painter.resetTransform(); layer->painter.setCompositionMode(QPainter::CompositionMode_DestinationIn); - layer->painter.drawImage(QPoint(), layer->alphaMask); + layer->painter.drawPixmap(QPoint(), layer->alphaMask); } else --m_data->layerCount; // see the comment for layerCount layer->painter.end(); @@ -1124,7 +1125,7 @@ void GraphicsContext::endPlatformTransparencyLayer() p->save(); p->resetTransform(); p->setOpacity(layer->opacity); - p->drawImage(layer->offset, layer->image); + p->drawPixmap(layer->offset, layer->pixmap); p->restore(); delete layer; |