diff options
author | Vladimir Chtchetkine <vchtchetkine@google.com> | 2012-04-11 13:22:48 -0700 |
---|---|---|
committer | Vladimir Chtchetkine <vchtchetkine@google.com> | 2012-04-11 13:22:48 -0700 |
commit | 1a820e90d8848c6b0ac7c78b5a2e8b28c9738a3a (patch) | |
tree | 6d7da6487df206f892f3629f62ec71a2d0331fe1 /vl-android.c | |
parent | b12c531a21d1e6edcc28dcfcd4ea63bd36db30c1 (diff) | |
download | external_qemu-1a820e90d8848c6b0ac7c78b5a2e8b28c9738a3a.zip external_qemu-1a820e90d8848c6b0ac7c78b5a2e8b28c9738a3a.tar.gz external_qemu-1a820e90d8848c6b0ac7c78b5a2e8b28c9738a3a.tar.bz2 |
Enable multi-touch emulation with -gpu on
This CL implements a callback that gets invoked by OpenGLES emulator on it framebuffer
updates. This allows transferring framebuffer changes to the supporting device.
Proper implementation of this new callback also required changes to JPEG compression,
addressing:
1. OpenGLES framebuffer format is RGBA8889, which required implementing line conversion
for this format.
2. OpenGLES framebuffer is (or at least could be) bottom-up arranged. This requires changes
to the compressor, so it compresses the FB starting from the bottom, so the resulting
image is up-bottom.
Change-Id: Icd4efbe4a251c838adfa3518decbfc43a7ef06c8
Diffstat (limited to 'vl-android.c')
-rw-r--r-- | vl-android.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vl-android.c b/vl-android.c index 67da637..5a41e2d 100644 --- a/vl-android.c +++ b/vl-android.c @@ -68,6 +68,7 @@ #include "android/utils/timezone.h" #include "android/snapshot.h" #include "android/opengles.h" +#include "android/multitouch-screen.h" #include "targphys.h" #include "tcpdump.h" @@ -3877,8 +3878,12 @@ int main(int argc, char **argv, char **envp) if (android_hw->hw_gpu_enabled) { if (android_initOpenglesEmulation() == 0) { gles_emul = 1; + /* Set framebuffer change notification callback when starting + * GLES emulation. Currently only multi-touch emulation is + * interested in FB changes (to transmit them to the device), so + * the callback is set within MT emulation.*/ android_startOpenglesRenderer(android_hw->hw_lcd_width, android_hw->hw_lcd_height, - NULL, NULL); + multitouch_opengles_fb_update, NULL); } else { dwarning("Could not initialize OpenglES emulation, using software renderer."); } |