[wayland] Switch to SurfaceInterface::bufferScale()

SurfaceInterface::scale() has been renamed to SurfaceInterface::bufferScale().
This commit is contained in:
Vlad Zahorodnii 2020-06-19 10:20:57 +03:00 committed by Vlad Zahorodnii
parent e1b5fc9fac
commit ad73e13478
4 changed files with 6 additions and 6 deletions

View file

@ -1692,7 +1692,7 @@ public:
QImage cursorImage;
cursorImage = buffer->data().copy();
cursorImage.setDevicePixelRatio(cursorSurface->scale());
cursorImage.setDevicePixelRatio(cursorSurface->bufferScale());
cursor->updateCursor(cursorImage, tcursor->hotspot());
});

View file

@ -1110,7 +1110,7 @@ void CursorImage::updateServerCursor()
}
m_serverCursor.cursor.hotspot = c->hotspot();
m_serverCursor.cursor.image = buffer->data().copy();
m_serverCursor.cursor.image.setDevicePixelRatio(cursorSurface->scale());
m_serverCursor.cursor.image.setDevicePixelRatio(cursorSurface->bufferScale());
if (needsEmit) {
emit changed();
}
@ -1207,7 +1207,7 @@ void CursorImage::updateDragCursor()
if (additionalIcon.isNull()) {
m_drag.cursor.image = buffer->data().copy();
m_drag.cursor.image.setDevicePixelRatio(cursorSurface->scale());
m_drag.cursor.image.setDevicePixelRatio(cursorSurface->bufferScale());
} else {
QRect cursorRect = buffer->data().rect();
QRect iconRect = additionalIcon.rect();
@ -1224,7 +1224,7 @@ void CursorImage::updateDragCursor()
}
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);
QPainter p(&m_drag.cursor.image);
p.drawImage(iconRect, additionalIcon);

View file

@ -1259,7 +1259,7 @@ QPoint WindowPixmap::framePosition() const
qreal WindowPixmap::scale() const
{
if (surface())
return surface()->scale();
return surface()->bufferScale();
return toplevel()->bufferScale();
}

View file

@ -552,7 +552,7 @@ qreal Toplevel::screenScale() const
qreal Toplevel::bufferScale() const
{
return surface() ? surface()->scale() : 1;
return surface() ? surface()->bufferScale() : 1;
}
bool Toplevel::isOnScreen(int screen) const