From e1671f51dde620a403fdf9a6d71d9a89f8795b96 Mon Sep 17 00:00:00 2001
From: Bernhard Rosenkraenzer
Date: Thu, 8 Apr 2010 16:20:44 +0200
Subject: Tweak the display update IOCTL calls It seems to be best practice to
pass the "update flash" command only when the entire display needs to be
updated, while the refresh call without updating flash is sufficient for
updating smaller regions
Merge-request: 417
Reviewed-by: Tom Cooksey
---
src/gui/embedded/qscreenlinuxfb_qws.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/gui/embedded/qscreenlinuxfb_qws.cpp b/src/gui/embedded/qscreenlinuxfb_qws.cpp
index 2cdd16f..4c91416 100644
--- a/src/gui/embedded/qscreenlinuxfb_qws.cpp
+++ b/src/gui/embedded/qscreenlinuxfb_qws.cpp
@@ -1221,7 +1221,7 @@ int QLinuxFbScreen::sharedRamSize(void * end)
/*!
\reimp
*/
-void QLinuxFbScreen::setDirty(const QRect &)
+void QLinuxFbScreen::setDirty(const QRect &r)
{
if(d_ptr->is8Track) {
// e-Ink displays need a trigger to actually show what is
@@ -1231,7 +1231,10 @@ void QLinuxFbScreen::setDirty(const QRect &)
// memory.
// There doesn't seem to be a way to tell it to just update
// a subset of the screen.
- ioctl(d_ptr->fd, 0x46a2, 1);
+ if(r.left() == 0 && r.top() == 0 && r.width() == dw && r.height() == dh)
+ ioctl(d_ptr->fd, 0x46a2, 1);
+ else
+ ioctl(d_ptr->fd, 0x46a2, 0);
}
}
--
cgit v0.12