summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/qandroidplatformscreen.h
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2017-02-28 03:55:18 +1100
committerRobin Burchell <robin.burchell@crimson.no>2017-04-11 14:26:16 +0000
commitb018a5ecef7b12c2d28df950a207ff3c7fc3abed (patch)
tree9af29544ea8a35fa6a2331d0d2735ba2c05dc929 /src/plugins/platforms/android/qandroidplatformscreen.h
parente91726ef9e09a084aad21d3ee27f6e2299908947 (diff)
QAndroidPlatformScreen: Use an event rather than a QTimer
It looks like the origins of this timer may come from QFbScreen. QFbScreen, however, changed away from a timer in d7068cbe1b37eb065c1902c8e944f3bc19db0ba4. There are other reasons to avoid a timer in this case, though: a timer may be pre-empted by application events (like other timers), which may mean a significant amount of time could pass between starting the timer and pushing the contents out to the actual screen (in doRedraw). This has the effect that flush becomes synchronous, which matches the behavior of the other platforms as far as I can tell. Change-Id: Ic67ae6c82945a247dceac44ee1bf7d2940f79d07 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Diffstat (limited to 'src/plugins/platforms/android/qandroidplatformscreen.h')
-rw-r--r--src/plugins/platforms/android/qandroidplatformscreen.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformscreen.h b/src/plugins/platforms/android/qandroidplatformscreen.h
index 923c9e8832..8abfd78253 100644
--- a/src/plugins/platforms/android/qandroidplatformscreen.h
+++ b/src/plugins/platforms/android/qandroidplatformscreen.h
@@ -89,10 +89,12 @@ public slots:
void setSize(const QSize &size);
protected:
+ bool event(QEvent *event);
+
typedef QList<QAndroidPlatformWindow *> WindowStackType;
WindowStackType m_windowStack;
QRect m_dirtyRect;
- QTimer m_redrawTimer;
+ bool m_updatePending = false;
QRect m_availableGeometry;
int m_depth;