diff options
author | Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> | 2012-07-05 22:00:28 +0530 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-11 12:43:12 +0200 |
commit | 4f5a9c8791588abdd6c7c0f94cbaeea1c65d8130 (patch) | |
tree | 85d366a0077907f9a8e0b9dc86fd329d42e97f04 /src/platformsupport/fbconvenience/qfbbackingstore.cpp | |
parent | c452418e9f09d7bd22b8c32d885a533aa93ffca3 (diff) |
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>
Diffstat (limited to 'src/platformsupport/fbconvenience/qfbbackingstore.cpp')
-rw-r--r-- | src/platformsupport/fbconvenience/qfbbackingstore.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/platformsupport/fbconvenience/qfbbackingstore.cpp b/src/platformsupport/fbconvenience/qfbbackingstore.cpp index 80ba4031ec..14a51d7a67 100644 --- a/src/platformsupport/fbconvenience/qfbbackingstore.cpp +++ b/src/platformsupport/fbconvenience/qfbbackingstore.cpp @@ -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) |