Commit 4b76d50a authored by Alessandro Portale's avatar Alessandro Portale Committed by hjk
Browse files

Core: calling QImage::constBits() instead of QImage::bits()

the non-const QImage::bits() performs shared-data checks. With
QImage::constBits() we can skip those for sure in cases where we only
want to read.

Change-Id: Ic5f328b54eb2d9930ad31b4df8d9b636dc005982
Reviewed-by: default avatarhjk <>
parent 18dca1e3
......@@ -65,8 +65,8 @@ void Animation::drawBlendedImage(QPainter *painter, const QRect &rect, float alp
case 32:
uchar *mixed_data = m_tempImage.bits();
const uchar *back_data = m_primaryImage.bits();
const uchar *front_data = m_secondaryImage.bits();
const uchar *back_data = m_primaryImage.constBits();
const uchar *front_data = m_secondaryImage.constBits();
for (int sy = 0; sy < sh; sy++) {
quint32 *mixed = (quint32*)mixed_data;
const quint32* back = (const quint32*)back_data;
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