From: sungmin ha Date: Tue, 14 May 2013 08:54:14 +0000 (+0900) Subject: sync with latest X-Git-Tag: 2.2.1_release~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b17056e3d5c144103dd2c3d71466482093bfa8c;p=sdk%2Femulator%2Fqemu.git sync with latest --- diff --git a/package/changelog b/package/changelog index 3252331..fb518c6 100644 --- a/package/changelog +++ b/package/changelog @@ -1,3 +1,19 @@ +* 1.5.38 +- modified process of using virtio keyboard queue and added key release event when context menu is activated +== Sungmin Ha 2013-05-14 +* 1.5.37 +- remove Open_Source_Announcement.txt file +== jihye kim 2013-05-09 + +* 1.5.36 +- call setBounds of display in arrangeSkin +== GiWoong Kim 2013-05-03 +* 1.5.35 +- dispose the framebuffer through syncExec +== GiWoong Kim 2013-05-02 +* 1.5.33 +- apply patch modified by Fengqian.Gao +== Sungmin Ha 2013-04-29 * 1.5.32 - Fix the slideshow problem of gallery app. == Sangjin Kim 2013-04-23 diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest index afc6f72..1c22f7c 100644 --- a/package/pkginfo.manifest +++ b/package/pkginfo.manifest @@ -1,4 +1,4 @@ -Version: 1.5.32 +Version: 1.5.38 Maintainer: Yeong-Kyoon Lee Source: emulator diff --git a/tizen/src/hw/gloffscreen_xcomposite.c b/tizen/src/hw/gloffscreen_xcomposite.c index 63beae8..7c04331 100644 --- a/tizen/src/hw/gloffscreen_xcomposite.c +++ b/tizen/src/hw/gloffscreen_xcomposite.c @@ -368,6 +368,10 @@ void glo_surface_destroy(GloSurface *surface) { if(surface->pixmap) XFreePixmap( glo.dpy, surface->pixmap); + + if(surface->glxPixmap) + glXDestroyPixmap( glo.dpy, surface->glxPixmap); + XDestroyWindow( glo.dpy, surface->window); if(surface->image) glo_surface_free_xshm_image(surface); diff --git a/tizen/src/hw/maru_virtio_keyboard.c b/tizen/src/hw/maru_virtio_keyboard.c index 6cae72f..9c36770 100644 --- a/tizen/src/hw/maru_virtio_keyboard.c +++ b/tizen/src/hw/maru_virtio_keyboard.c @@ -42,7 +42,6 @@ static void virtio_keyboard_handle(VirtIODevice *vdev, VirtQueue *vq) VirtIOKeyboard *vkbd = (VirtIOKeyboard *)vdev; int index = 0; - TRACE("virtqueue handler.\n"); if (virtio_queue_empty(vkbd->vq)) { INFO("virtqueue is empty.\n"); return; @@ -51,7 +50,7 @@ static void virtio_keyboard_handle(VirtIODevice *vdev, VirtQueue *vq) /* Get a queue buffer which is written by guest side. */ do { index = virtqueue_pop(vq, &elem); - TRACE("virtqueue pop. index: %d\n", index); + TRACE("virtqueue pop.\n"); } while (index < VIRTIO_KBD_QUEUE_SIZE); } @@ -67,7 +66,7 @@ void virtio_keyboard_notify(void *opaque) return; } - TRACE("[Enter] virtqueue notifier. %d\n", written_cnt); + TRACE("[Enter] virtqueue notifier.\n"); if (!virtio_queue_ready(vkbd->vq)) { INFO("virtqueue is not ready.\n"); @@ -83,19 +82,14 @@ void virtio_keyboard_notify(void *opaque) while ((written_cnt--)) { kbdevt = &vkbd->kbdqueue.kbdevent[vkbd->kbdqueue.rptr]; - - while (((EmulKbdEvent*)(elem.in_sg[index].iov_base))->code != 0) { - if (++index == VIRTIO_KBD_QUEUE_SIZE) { - index--; - TRACE("virtio queue is full.\n"); - break; - } - } + if (((EmulKbdEvent*)(elem.in_sg[vkbd->kbdqueue.rptr].iov_base))->code != 0) { + TRACE("FIXME: virtio queue is full.\n"); + } /* Copy keyboard data into guest side. */ TRACE("copy: keycode %d, type %d, elem_index %d\n", - kbdevt->code, kbdevt->type, index); - memcpy(elem.in_sg[index++].iov_base, kbdevt, sizeof(EmulKbdEvent)); + kbdevt->code, kbdevt->type, vkbd->kbdqueue.rptr); + memcpy(elem.in_sg[vkbd->kbdqueue.rptr].iov_base, kbdevt, sizeof(EmulKbdEvent)); memset(kbdevt, 0x00, sizeof(EmulKbdEvent)); if (vkbd->kbdqueue.wptr > 0) { @@ -106,7 +100,6 @@ void virtio_keyboard_notify(void *opaque) vkbd->kbdqueue.rptr++; if (vkbd->kbdqueue.rptr == VIRTIO_KBD_QUEUE_SIZE) { vkbd->kbdqueue.rptr = 0; - TRACE("kbdqueue is full.\n"); } } qemu_mutex_unlock(&vkbd->event_mutex); diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorShmSkin.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorShmSkin.java index 7bcccd8..71a47b0 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorShmSkin.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorShmSkin.java @@ -129,9 +129,13 @@ public class EmulatorShmSkin extends EmulatorSkin { imageData.setPixels(0, 0, sizeFramebuffer, arrayFramebuffer, 0); - temp = framebuffer; - framebuffer = new Image(display, imageData); - temp.dispose(); + display.syncExec(new Runnable() { + @Override + public void run() { + framebuffer.dispose(); + framebuffer = new Image(display, imageData); + } + }); if (display.isDisposed() == false) { /* redraw canvas */ diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java index e5f7f90..db530ed 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java @@ -566,6 +566,7 @@ public class EmulatorSkin { @Override public void menuDetected(MenuDetectEvent e) { Menu menu = EmulatorSkin.this.contextMenu; + keyReleaseEvent(); if (menu != null && EmulatorSkin.this.isDragStartedInLCD == false) { lcdCanvas.setMenu(menu); @@ -592,22 +593,7 @@ public class EmulatorSkin { @Override public void focusLost(FocusEvent event) { logger.info("lost focus"); - - /* key event compensation */ - if (pressedKeyEventList.isEmpty() == false) { - for (KeyEventData data : pressedKeyEventList) { - KeyEventData keyEventData = new KeyEventData( - KeyEventType.RELEASED.value(), data.keycode, - data.stateMask, data.keyLocation); - communicator.sendToQEMU(SendCommand.SEND_KEY_EVENT, keyEventData); - - logger.info("auto release : keycode=" + keyEventData.keycode + - ", stateMask=" + keyEventData.stateMask + - ", keyLocation=" + keyEventData.keyLocation); - } - } - - pressedKeyEventList.clear(); + keyReleaseEvent(); } }; @@ -1709,4 +1695,22 @@ public class EmulatorSkin { return currentState.getCurrentRotationId(); } + public void keyReleaseEvent() { + /* key event compensation */ + if (pressedKeyEventList.isEmpty() == false) { + for (KeyEventData data : pressedKeyEventList) { + KeyEventData keyEventData = new KeyEventData( + KeyEventType.RELEASED.value(), data.keycode, + data.stateMask, data.keyLocation); + communicator.sendToQEMU( + SendCommand.SEND_KEY_EVENT, keyEventData, false); + + logger.info("auto release : keycode=" + keyEventData.keycode + + ", stateMask=" + keyEventData.stateMask + + ", keyLocation=" + keyEventData.keyLocation); + } + } + + pressedKeyEventList.clear(); + } } diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkinMain.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkinMain.java index d93a1bd..5ee5524 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkinMain.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkinMain.java @@ -129,6 +129,15 @@ public class EmulatorSkinMain { logger = SkinLogger.getSkinLogger(EmulatorSkinMain.class).getLogger(); logger.info("!!! Start Emualtor Skin !!!"); + logger.info("java.version: " + System.getProperty("java.version")); + logger.info("java vendor: " + System.getProperty("java.vendor")); + logger.info("vm version: " + System.getProperty("java.vm.version")); + logger.info("vm vendor: " + System.getProperty("java.vm.vendor")); + logger.info("vm name: " + System.getProperty("java.vm.name")); + logger.info("os name: " + System.getProperty("os.name")); + logger.info("os arch: " + System.getProperty("os.arch")); + logger.info("os version: " + System.getProperty("os.version")); + /* startup arguments parsing */ Map argsMap = parsArgs(args); diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/PhoneShapeSkinComposer.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/PhoneShapeSkinComposer.java index 9b59b73..efa674a 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/PhoneShapeSkinComposer.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/layout/PhoneShapeSkinComposer.java @@ -184,6 +184,9 @@ public class PhoneShapeSkinComposer implements ISkinComposer { logger.info("lcd bounds : " + lcdBounds); currentState.setDisplayBounds(lcdBounds); + if (SwtUtil.isMacPlatform() == true) { + lcdCanvas.setBounds(currentState.getDisplayBounds()); + } /* arrange the skin image */ Image tempImage = null; @@ -273,7 +276,9 @@ public class PhoneShapeSkinComposer implements ISkinComposer { public void paintControl(final PaintEvent e) { if (currentState.isNeedToUpdateDisplay() == true) { currentState.setNeedToUpdateDisplay(false); - lcdCanvas.setBounds(currentState.getDisplayBounds()); + if (SwtUtil.isMacPlatform() == false) { + lcdCanvas.setBounds(currentState.getDisplayBounds()); + } if (skin.communicator.isSensorDaemonStarted() == true) { /* Let's do one more update for sdl display surface