Commit ad73e134 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii Committed by Vlad Zahorodnii
Browse files

[wayland] Switch to SurfaceInterface::bufferScale()

SurfaceInterface::scale() has been renamed to SurfaceInterface::bufferScale().
parent e1b5fc9f
...@@ -1692,7 +1692,7 @@ public: ...@@ -1692,7 +1692,7 @@ public:
QImage cursorImage; QImage cursorImage;
cursorImage = buffer->data().copy(); cursorImage = buffer->data().copy();
cursorImage.setDevicePixelRatio(cursorSurface->scale()); cursorImage.setDevicePixelRatio(cursorSurface->bufferScale());
cursor->updateCursor(cursorImage, tcursor->hotspot()); cursor->updateCursor(cursorImage, tcursor->hotspot());
}); });
......
...@@ -1110,7 +1110,7 @@ void CursorImage::updateServerCursor() ...@@ -1110,7 +1110,7 @@ void CursorImage::updateServerCursor()
} }
m_serverCursor.cursor.hotspot = c->hotspot(); m_serverCursor.cursor.hotspot = c->hotspot();
m_serverCursor.cursor.image = buffer->data().copy(); m_serverCursor.cursor.image = buffer->data().copy();
m_serverCursor.cursor.image.setDevicePixelRatio(cursorSurface->scale()); m_serverCursor.cursor.image.setDevicePixelRatio(cursorSurface->bufferScale());
if (needsEmit) { if (needsEmit) {
emit changed(); emit changed();
} }
...@@ -1207,7 +1207,7 @@ void CursorImage::updateDragCursor() ...@@ -1207,7 +1207,7 @@ void CursorImage::updateDragCursor()
if (additionalIcon.isNull()) { if (additionalIcon.isNull()) {
m_drag.cursor.image = buffer->data().copy(); m_drag.cursor.image = buffer->data().copy();
m_drag.cursor.image.setDevicePixelRatio(cursorSurface->scale()); m_drag.cursor.image.setDevicePixelRatio(cursorSurface->bufferScale());
} else { } else {
QRect cursorRect = buffer->data().rect(); QRect cursorRect = buffer->data().rect();
QRect iconRect = additionalIcon.rect(); QRect iconRect = additionalIcon.rect();
...@@ -1224,7 +1224,7 @@ void CursorImage::updateDragCursor() ...@@ -1224,7 +1224,7 @@ void CursorImage::updateDragCursor()
} }
m_drag.cursor.image = QImage(cursorRect.united(iconRect).size(), QImage::Format_ARGB32_Premultiplied); m_drag.cursor.image = QImage(cursorRect.united(iconRect).size(), QImage::Format_ARGB32_Premultiplied);
m_drag.cursor.image.setDevicePixelRatio(cursorSurface->scale()); m_drag.cursor.image.setDevicePixelRatio(cursorSurface->bufferScale());
m_drag.cursor.image.fill(Qt::transparent); m_drag.cursor.image.fill(Qt::transparent);
QPainter p(&m_drag.cursor.image); QPainter p(&m_drag.cursor.image);
p.drawImage(iconRect, additionalIcon); p.drawImage(iconRect, additionalIcon);
......
...@@ -1259,7 +1259,7 @@ QPoint WindowPixmap::framePosition() const ...@@ -1259,7 +1259,7 @@ QPoint WindowPixmap::framePosition() const
qreal WindowPixmap::scale() const qreal WindowPixmap::scale() const
{ {
if (surface()) if (surface())
return surface()->scale(); return surface()->bufferScale();
return toplevel()->bufferScale(); return toplevel()->bufferScale();
} }
......
...@@ -552,7 +552,7 @@ qreal Toplevel::screenScale() const ...@@ -552,7 +552,7 @@ qreal Toplevel::screenScale() const
qreal Toplevel::bufferScale() const qreal Toplevel::bufferScale() const
{ {
return surface() ? surface()->scale() : 1; return surface() ? surface()->bufferScale() : 1;
} }
bool Toplevel::isOnScreen(int screen) const bool Toplevel::isOnScreen(int screen) const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment