forked from qt-creator/qt-creator
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: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user