qplatformpixmap: use rvalue overload more
to reuse internal buffers Change-Id: I7cfd6b599912cc38f796356197748f97da3eb47d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
470fab51fb
commit
6d4385b697
@ -160,7 +160,7 @@ QBitmap QPlatformPixmap::mask() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return QBitmap::fromImage(mask);
|
return QBitmap::fromImage(std::move(mask));
|
||||||
}
|
}
|
||||||
|
|
||||||
void QPlatformPixmap::setMask(const QBitmap &mask)
|
void QPlatformPixmap::setMask(const QBitmap &mask)
|
||||||
@ -168,7 +168,7 @@ void QPlatformPixmap::setMask(const QBitmap &mask)
|
|||||||
QImage image = toImage();
|
QImage image = toImage();
|
||||||
if (mask.size().isEmpty()) {
|
if (mask.size().isEmpty()) {
|
||||||
if (image.depth() != 1) { // hw: ????
|
if (image.depth() != 1) { // hw: ????
|
||||||
image = image.convertToFormat(QImage::Format_RGB32);
|
image = std::move(image).convertToFormat(QImage::Format_RGB32);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const int w = image.width();
|
const int w = image.width();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user