qpa: avoid useless resize in DirectFB platform
Check current size before resizing QDirectFbBackingStore through its resize() method to avoid useless deallocation/reallocation. Change-Id: Idc32eb20d3d3cac988fa9dd2feb80910303f5763 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This commit is contained in:
parent
5f974a4faf
commit
6a15a784f4
@ -82,6 +82,12 @@ void QDirectFbBackingStore::flush(QWindow *, const QRegion ®ion, const QPoint
|
||||
|
||||
void QDirectFbBackingStore::resize(const QSize &size, const QRegion& reg)
|
||||
{
|
||||
Q_UNUSED(reg);
|
||||
|
||||
if ((m_pmdata->width() == size.width()) &&
|
||||
(m_pmdata->height() == size.height()))
|
||||
return;
|
||||
|
||||
QDirectFbBlitter *blitter = new QDirectFbBlitter(size, m_dfbSurface.data());
|
||||
m_pmdata->setBlittable(blitter);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user