aboutsummaryrefslogtreecommitdiffstats
path: root/android/multitouch-port.c
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2012-05-15 09:01:52 -0700
committerVladimir Chtchetkine <vchtchetkine@google.com>2012-05-15 09:01:52 -0700
commit1129b0b97f1c204bd86ee6d19cbf3b4c2275762b (patch)
treef3d256baee1cbcde7275f6973bfe9d27b4d034eb /android/multitouch-port.c
parent6df71197252e119baccbe4dd060935222af4f8ba (diff)
downloadexternal_qemu-1129b0b97f1c204bd86ee6d19cbf3b4c2275762b.zip
external_qemu-1129b0b97f1c204bd86ee6d19cbf3b4c2275762b.tar.gz
external_qemu-1129b0b97f1c204bd86ee6d19cbf3b4c2275762b.tar.bz2
Improve FB update protocol.
As it turned out, emulator has been sending Fb updates faster than MT handler on the device could process them. This lead to significant screen lag between the emulator and the device. With this CL emulator will not send FB updates to the device until the device has fully proccesed the previous FB update. Change-Id: I9a39e9f358f87d5bd6baaa2617a79e7de59ae99e
Diffstat (limited to 'android/multitouch-port.c')
-rw-r--r--android/multitouch-port.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/android/multitouch-port.c b/android/multitouch-port.c
index faefdbf..88a76fe 100644
--- a/android/multitouch-port.c
+++ b/android/multitouch-port.c
@@ -48,17 +48,21 @@
*/
/* Pointer move message. */
-#define SDKCTL_MT_MOVE 1
+#define SDKCTL_MT_MOVE 1
/* First pointer down message. */
-#define SDKCTL_MT_FISRT_DOWN 2
+#define SDKCTL_MT_FISRT_DOWN 2
/* Last pointer up message. */
-#define SDKCTL_MT_LAST_UP 3
+#define SDKCTL_MT_LAST_UP 3
/* Pointer down message. */
-#define SDKCTL_MT_POINTER_DOWN 4
+#define SDKCTL_MT_POINTER_DOWN 4
/* Pointer up message. */
-#define SDKCTL_MT_POINTER_UP 5
+#define SDKCTL_MT_POINTER_UP 5
/* Sends framebuffer update. */
-#define SDKCTL_MT_FB_UPDATE 6
+#define SDKCTL_MT_FB_UPDATE 6
+/* Framebuffer update has been received. */
+#define SDKCTL_MT_FB_UPDATE_RECEIVED 7
+/* Framebuffer update has been handled. */
+#define SDKCTL_MT_FB_UPDATE_HANDLED 8
/* Multi-touch port descriptor. */
struct AndroidMTSPort {
@@ -332,6 +336,15 @@ _on_multitouch_message(void* client_opaque,
_on_pup((const AndroidMTPtr*)msg_data);
break;
+ case SDKCTL_MT_FB_UPDATE_RECEIVED:
+ D("Framebuffer update ACK.");
+ break;
+
+ case SDKCTL_MT_FB_UPDATE_HANDLED:
+ D("Framebuffer update handled.");
+ multitouch_fb_updated();
+ break;
+
default:
W("Multi-touch: Unknown message %d", msg_type);
break;