linuxfb: create image only on resize
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Thomas Senyk <thomas.senyk@nokia.com> Change-Id: I04cd75f96cf755ef0c12fad70e3bbd96fbbed9a1 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
This commit is contained in:
parent
c452418e9f
commit
4f5a9c8791
@ -51,7 +51,6 @@ QT_BEGIN_NAMESPACE
|
||||
QFbBackingStore::QFbBackingStore(QWindow *window)
|
||||
: QPlatformBackingStore(window)
|
||||
{
|
||||
mImage = QImage(window->size(), window->screen()->handle()->format());
|
||||
(static_cast<QFbWindow *>(window->handle()))->setBackingStore(this);
|
||||
}
|
||||
|
||||
@ -67,18 +66,12 @@ void QFbBackingStore::flush(QWindow *window, const QRegion ®ion, const QPoint
|
||||
(static_cast<QFbWindow *>(window->handle()))->repaint(region);
|
||||
}
|
||||
|
||||
void QFbBackingStore::resize(const QSize &size, const QRegion ®ion)
|
||||
void QFbBackingStore::resize(const QSize &size, const QRegion &staticContents)
|
||||
{
|
||||
Q_UNUSED(region);
|
||||
// change the widget's QImage if this is a resize
|
||||
Q_UNUSED(staticContents);
|
||||
|
||||
if (mImage.size() != size)
|
||||
mImage = QImage(size, window()->screen()->handle()->format());
|
||||
// QPlatformBackingStore::resize(size);
|
||||
}
|
||||
|
||||
bool QFbBackingStore::scroll(const QRegion &area, int dx, int dy)
|
||||
{
|
||||
return QPlatformBackingStore::scroll(area, dx, dy);
|
||||
}
|
||||
|
||||
void QFbBackingStore::beginPaint(const QRegion ®ion)
|
||||
|
@ -58,7 +58,6 @@ public:
|
||||
|
||||
virtual QPaintDevice *paintDevice() { return &mImage; }
|
||||
virtual void flush(QWindow *window, const QRegion ®ion, const QPoint &offset);
|
||||
virtual bool scroll(const QRegion &area, int dx, int dy);
|
||||
|
||||
virtual void beginPaint(const QRegion ®ion);
|
||||
virtual void endPaint(const QRegion ®ion);
|
||||
|
Loading…
Reference in New Issue
Block a user