summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/WebCore/platform/graphics/qt/TransparencyLayer.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/WebCore/platform/graphics/qt/TransparencyLayer.h b/Source/WebCore/platform/graphics/qt/TransparencyLayer.h
index f13deb03b..0312690e0 100644
--- a/Source/WebCore/platform/graphics/qt/TransparencyLayer.h
+++ b/Source/WebCore/platform/graphics/qt/TransparencyLayer.h
@@ -46,11 +46,13 @@ struct TransparencyLayer {
WTF_MAKE_FAST_ALLOCATED;
public:
TransparencyLayer(const QPainter* p, const QRect &rect, qreal opacity, QPixmap& alphaMask)
- : pixmap(rect.width(), rect.height())
- , opacity(opacity)
+ : opacity(opacity)
, alphaMask(alphaMask)
, saveCounter(1) // see the comment for saveCounter
{
+ int devicePixelRatio = p->device()->devicePixelRatio();
+ pixmap = QPixmap(rect.width() * devicePixelRatio, rect.height() * devicePixelRatio);
+ pixmap.setDevicePixelRatio(devicePixelRatio);
offset = rect.topLeft();
pixmap.fill(Qt::transparent);
painter.begin(&pixmap);