Merge remote-tracking branch 'score/develop' into tizen-arm-v1.1.0-develop
authorEvgeny Voevodin <e.voevodin@samsung.com>
Mon, 9 Jul 2012 06:57:06 +0000 (10:57 +0400)
committerEvgeny Voevodin <e.voevodin@samsung.com>
Fri, 13 Jul 2012 05:26:17 +0000 (09:26 +0400)
Conflicts:
tcg/i386/tcg-target.c
        Left untouched ld/st optimization from upstream patches.

tizen/qemu_configure.sh
vl.c
        Left untouched our implementation of switching between enabled
        or disable VirtioGL for target.

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
package/pkginfo.manifest
target-i386/hax-all.c
tizen/qemu_configure.sh
tizen/src/hw/opengl_exec.c
tizen/src/maru_finger.c
tizen/src/maru_finger.h
tizen/src/maru_sdl.c
tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java
tizen/src/skin/client/src/org/tizen/emulator/skin/screenshot/ScreenShotDialog.java
tizen/src/skin/maruskin_operation.c

index 798ccb5690adbea68c397daea4f328b7d1a9bbc9..967cd43e04b963e0a105f6d392f2216a99d0daa9 100644 (file)
@@ -1,5 +1,5 @@
 Package: emulator
-Version: 1.2.95
+Version: 1.2.100
 OS: linux
 Build-host-os: linux
 Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
@@ -8,7 +8,7 @@ Source: emulator
 Description: Tizen Emulator
 
 Package: emulator
-Version: 1.2.95
+Version: 1.2.100
 OS: windows
 Build-host-os: windows
 Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
index 6c3354aad3f3b652809245488b5deca5f54f4a08..39e43c419c80b0245ac30e697f53e5d3d1a2af88 100644 (file)
@@ -573,7 +573,7 @@ static int hax_vcpu_hax_exec(CPUState *env)
     }
 
     
-    hax_cpu_synchronize_state(env);
+    //hax_cpu_synchronize_state(env);
 
     do {
         int hax_ret;
@@ -584,10 +584,12 @@ static int hax_vcpu_hax_exec(CPUState *env)
             break;
         }
 
+#if 0
        if (env->hax_vcpu_dirty) {
                hax_vcpu_sync_state(env, 1);
                env->hax_vcpu_dirty = 0;
        }
+#endif
 
         hax_vcpu_interrupt(env);
 
index cd766944a0ce1034f105387cad61dc66b4a27ac3..35795b4cfd901975e24bc2c682d937513ad444f8 100755 (executable)
@@ -15,6 +15,8 @@ exec ./configure \
  --audio-card-list=ac97 \
  --enable-ldst-optimization \
  --enable-maru \
+ --disable-vnc-jpeg \
+ --disable-vnc-png \
  --enable-opengles \
  --enable-gl \
  --disable-pie
@@ -30,6 +32,8 @@ exec ./configure \
  --enable-ldst-optimization \
  --enable-hax \
  --enable-maru \
+ --disable-vnc-jpeg \
+ --disable-vnc-png \
  --enable-opengles \
  --enable-gl
 ;;
index 4721199d374d453c68d18db7ff19b67d40a4ec6d..118380d972aa04f2ac18d561346adca3ea110cc9 100755 (executable)
@@ -1343,8 +1343,13 @@ int do_function_call(ProcessState *process, int func_number, unsigned long *args
             int i;
             for (i = 0; i < process->nb_states; i ++) {
                 if (process->glstates[i]->fake_ctxt == fake_ctxt) {
+                    /*XXX: DestroyContext should not switch current context, or
+                    * else guest still try to access it and cause qemu
+                    * segfalt. But not sure if any corner case, so comment it
+                    * for now and will remove it completely in future.
+                    */
                     // this was our GLState...
-                    process->current_state = &process->default_state;
+                    // process->current_state = &process->default_state;
 
                     int fake_shareList =
                         process->glstates[i]->fake_shareList;
index 9f03ba34f2a5e8cf4f2be32e9877d7bf9d029071..cc37f5970624665560180645fb843bc10489c853 100644 (file)
@@ -279,7 +279,7 @@ FingerPoint *get_finger_point_search(int x, int y)
 static int _grab_finger_id = 0;
 #define QEMU_MOUSE_PRESSED 1
 #define QEMU_MOUSE_RELEASEED 0
-void maru_finger_processing(int touch_type, int origin_x, int origin_y, int x, int y)
+void maru_finger_processing_A(int touch_type, int origin_x, int origin_y, int x, int y)
 {
     MultiTouchState *mts = get_emul_multi_touch_state();
     FingerPoint *finger = NULL;
@@ -339,7 +339,72 @@ void maru_finger_processing(int touch_type, int origin_x, int origin_y, int x, i
     } else if (touch_type == MOUSE_UP) { /* released */
         _grab_finger_id = 0;
     }
+}
+
+void maru_finger_processing_B(int touch_type, int origin_x, int origin_y, int x, int y)
+{
+    MultiTouchState *mts = get_emul_multi_touch_state();
+    FingerPoint *finger = NULL;
 
+    if (touch_type == MOUSE_DOWN || touch_type == MOUSE_DRAG) { /* pressed */
+        if (_grab_finger_id > 0) {
+            finger = get_finger_point_from_slot(_grab_finger_id - 1);
+            if (finger != NULL) {
+                int origin_distance_x = origin_x - finger->origin_x;
+                int origin_distance_y = origin_y - finger->origin_y;
+                int distance_x = x - finger->x;
+                int distance_y = y - finger->y;
+
+                int i = 0;
+                for( ; i < get_emul_multi_touch_state()->finger_cnt; i++) {
+                    finger = get_finger_point_from_slot(i);
+
+                    if (finger != NULL) {
+                        finger->origin_x += origin_distance_x;
+                        finger->origin_y += origin_distance_y;
+                        finger->x += distance_x;
+                        finger->y += distance_y;
+                        if (finger->id != 0) {
+                            kbd_mouse_event(finger->x, finger->y, i, QEMU_MOUSE_PRESSED);
+                            TRACE("id %d finger multi-touch dragging = (%d, %d)\n", i + 1, finger->x, finger->y);
+                        }
+#ifdef _WIN32
+                        Sleep(2);
+#else
+                        usleep(2000);
+#endif
+                    }
+                }
+            }
+            return;
+        }
+
+        if (mts->finger_cnt == 0)
+        { //first finger touch input
+            if (_add_finger_point(origin_x, origin_y, x, y) == -1) {
+                return;
+            }
+            kbd_mouse_event(x, y, 0, QEMU_MOUSE_PRESSED);
+        }
+        else if ((finger = get_finger_point_search(x, y)) != NULL) //check the position of previous touch event
+        {
+            //finger point is selected
+            _grab_finger_id = finger->id;
+            TRACE("id %d finger is grabbed\n", _grab_finger_id);
+        }
+        else if (mts->finger_cnt == mts->finger_cnt_max) //Let's assume that this event is last finger touch input
+        {
+            //do nothing
+        }
+        else //one more finger
+        {
+            _add_finger_point(origin_x, origin_y, x, y) ;
+            kbd_mouse_event(x, y, mts->finger_cnt - 1, QEMU_MOUSE_PRESSED);
+        }
+
+    } else if (touch_type == MOUSE_UP) { /* released */
+        _grab_finger_id = 0;
+    }
 }
 
 void clear_finger_slot(void)
index a8a40c091da05b231178791bfec2855aac7e36ef..53cc43a59e65a19a586b8a532e37643c06f99e1c 100644 (file)
@@ -34,7 +34,7 @@
 
 /* definitions relating to multi-touch */
 //TODO : from arg
-#define MAX_FINGER_CNT 2
+#define MAX_FINGER_CNT 3
 #define DEFAULT_FINGER_POINT_SIZE 32
 #define DEFAULT_FINGER_POINT_COLOR 0x7E0F0F0F
 #define DEFAULT_FINGER_POINT_OUTLINE_COLOR 0xDDDDDDDD
@@ -65,7 +65,8 @@ void set_multi_touch_enable(int enable);
 int get_multi_touch_enable(void);
 FingerPoint *get_finger_point_from_slot(int index);
 FingerPoint *get_finger_point_search(int x, int y);
-void maru_finger_processing(int touch_type, int origin_x, int origin_y, int x, int y);
+void maru_finger_processing_A(int touch_type, int origin_x, int origin_y, int x, int y);
+void maru_finger_processing_B(int touch_type, int origin_x, int origin_y, int x, int y);
 void clear_finger_slot(void);
 void cleanup_multi_touch_state(void);
 
index 5ee2122268ef2834c20c49aa7608327cd5f47fd8..0d810299b0d206641f14c51e5461aea140bd8bce 100644 (file)
@@ -83,7 +83,7 @@ static void qemu_update(void)
 
     /* draw multi-touch finger points */
     MultiTouchState *mts = get_emul_multi_touch_state();
-    if (mts->multitouch_enable == 1 && mts->finger_point_surface != NULL) {
+    if (mts->multitouch_enable != 0 && mts->finger_point_surface != NULL) {
         FingerPoint *finger = NULL;
         int finger_point_size_half = mts->finger_point_size / 2;
         SDL_Rect rect;
index b58101376e1ef555a429999525f13f951e611caf..336a289ad776748d24f4e957bbdca06094cdd863 100644 (file)
@@ -142,6 +142,7 @@ public class EmulatorSkin {
        private int currentLcdWidth;
        private int currentLcdHeight;
        private SkinRegion currentHoverRegion;
+       private SkinRegion currentPressedRegion;
 
        private int pressedMouseX;
        private int pressedMouseY;
@@ -529,7 +530,6 @@ public class EmulatorSkin {
                shell.addMouseTrackListener( shellMouseTrackListener );
 
                shellMouseMoveListener = new MouseMoveListener() {
-
                        @Override
                        public void mouseMove( MouseEvent e ) {
                                if ( EmulatorSkin.this.isMousePressed ) {
@@ -547,7 +547,6 @@ public class EmulatorSkin {
 
                                        }
                                } else {
-
                                        SkinRegion region = SkinUtil.getHardKeyArea( e.x, e.y, currentRotationId, currentScale );
 
                                        if ( null == region ) {
@@ -569,23 +568,30 @@ public class EmulatorSkin {
                                                }
 
                                                isHoverState = true;
-                                               GC gc = new GC( shell );
-                                               gc.setLineWidth( 1 );
-                                               gc.setForeground( hoverColor );
-                                               gc.drawRectangle( region.x, region.y, region.width, region.height );
                                                currentHoverRegion = region;
-                                               gc.dispose();
-                                       }
 
+                                               /* draw hover */
+                                               shell.getDisplay().asyncExec(new Runnable() {
+                                                       public void run() {
+                                                               if (currentHoverRegion.width != 0 && currentHoverRegion.height != 0) {
+                                                                       GC gc = new GC(shell);
+                                                                       gc.setLineWidth(1);
+                                                                       gc.setForeground(hoverColor);
+                                                                       gc.drawRectangle(currentHoverRegion.x, currentHoverRegion.y, currentHoverRegion.width, currentHoverRegion.height);
+
+                                                                       gc.dispose();
+                                                               }
+                                                       }
+                                               });
+                                       }
                                }
 
-                       }
+                       } //end of mouseMove
                };
 
                shell.addMouseMoveListener( shellMouseMoveListener );
 
                shellMouseListener = new MouseListener() {
-
                        @Override
                        public void mouseUp( MouseEvent e ) {
                                if ( 1 == e.button ) { // left button
@@ -597,9 +603,8 @@ public class EmulatorSkin {
                                        int keyCode = SkinUtil.getHardKeyCode( e.x, e.y, currentRotationId, currentScale );
 
                                        if ( SkinUtil.UNKNOWN_KEYCODE != keyCode ) {
-                                               
                                                // null check : prevent from mouse up without a hover (ex. doing always on top in hardkey area)
-                                               if( null != currentHoverRegion ) {
+                                               if ( null != currentHoverRegion ) {
                                                        if ( currentHoverRegion.width == 0 && currentHoverRegion.height == 0 ) {
                                                                shell.redraw();
                                                        } else {
@@ -607,7 +612,7 @@ public class EmulatorSkin {
                                                                                currentHoverRegion.height + 1, false );
                                                        }
                                                }
-                                               
+
                                                SkinUtil.trimShell( shell, currentImage );
 
                                                KeyEventData keyEventData = new KeyEventData( KeyEventType.RELEASED.value(), keyCode, 0 );
@@ -629,17 +634,39 @@ public class EmulatorSkin {
                                        int keyCode = SkinUtil.getHardKeyCode( e.x, e.y, currentRotationId, currentScale );
 
                                        if ( SkinUtil.UNKNOWN_KEYCODE != keyCode ) {
-                                               // draw the button region as the cropped keyPressed image area
-                                               SkinRegion region = SkinUtil.getHardKeyArea( e.x, e.y, currentRotationId, currentScale );
-
-                                               if ( null != currentKeyPressedImage ) {
-                                                       GC gc = new GC( shell );
-                                                       gc.drawImage( currentKeyPressedImage, region.x + 1, region.y + 1, region.width - 1,
-                                                                       region.height - 1, // src
-                                                                       region.x + 1, region.y + 1, region.width - 1, region.height - 1 ); // dst
-                                                       gc.dispose();
-
-                                                       SkinUtil.trimShell( shell, currentKeyPressedImage, region.x, region.y, region.width, region.height );
+                                               shell.setToolTipText(null);
+
+                                               /* draw the button region as the cropped keyPressed image area */
+                                               currentPressedRegion = SkinUtil.getHardKeyArea( e.x, e.y, currentRotationId, currentScale );
+                                               if (currentPressedRegion != null && currentPressedRegion.width != 0 && currentPressedRegion.height != 0) {
+                                                       shell.getDisplay().asyncExec(new Runnable() {
+                                                               public void run() {
+                                                                       if ( null != currentKeyPressedImage ) {
+                                                                               GC gc = new GC( shell );
+
+                                                                               /* button */
+                                                                               gc.drawImage(currentKeyPressedImage,
+                                                                                               currentPressedRegion.x + 1, currentPressedRegion.y + 1,
+                                                                                               currentPressedRegion.width - 1, currentPressedRegion.height - 1, //src
+                                                                                               currentPressedRegion.x + 1, currentPressedRegion.y + 1,
+                                                                                               currentPressedRegion.width - 1, currentPressedRegion.height - 1); //dst
+
+                                                                               /* hover */
+                                                                               if (currentHoverRegion.width != 0 && currentHoverRegion.height != 0) {
+                                                                                       gc.setLineWidth(1);
+                                                                                       gc.setForeground(hoverColor);
+                                                                                       gc.drawRectangle(currentHoverRegion.x, currentHoverRegion.y, currentHoverRegion.width, currentHoverRegion.height);
+                                                                               }
+
+                                                                               gc.dispose();
+
+                                                                               SkinUtil.trimShell(shell, currentKeyPressedImage,
+                                                                                               currentPressedRegion.x, currentPressedRegion.y, currentPressedRegion.width, currentPressedRegion.height);
+
+                                                                               currentPressedRegion = null;
+                                                                       }
+                                                               }
+                                                       });
                                                }
 
                                                KeyEventData keyEventData = new KeyEventData( KeyEventType.PRESSED.value(), keyCode, 0 );
@@ -1477,13 +1504,15 @@ public class EmulatorSkin {
 
                                // readyToReopen( EmulatorSkin.this, isOnTop );
 
+                               //internal/Library.java::arch()
                                String osArch = System.getProperty("os.arch"); //$NON-NLS-1$
-                               if (osArch.equals ("i386") || osArch.equals ("i686")) { //$NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
+                               logger.info(osArch);
+                               if (osArch.equals("amd64") || osArch.equals("IA64N") || osArch.equals("IA64W")) { //$NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
+                                       logger.info("64bit architecture");
+                                       setTopMost64(isOnTop); //64bit
+                               } else {
                                        logger.info("32bit architecture");
                                        setTopMost32(isOnTop);
-                               } else { //64bit OS
-                                       logger.info("64bit architecture");
-                                       setTopMost64(isOnTop);
                                }
                        }
                } );
index 2442e3fdff61395be1faf64183eddef6ce86277e..82acd19946b24d92ae5b194134c0d83956ab546b 100644 (file)
@@ -461,6 +461,7 @@ public class ScreenShotDialog {
                                        logger.warning( "Cannot find user home path int java System properties." );
                                }
 
+                               fileDialog.setOverwrite(true);
                                String filePath = fileDialog.open();
                                saveFile( filePath, fileDialog );
 
index d8f289b2c5a14a4110d52bc90b59395ff52fd727..e38511b19b635419342dc22fad2a3310c3bb5c6d 100644 (file)
@@ -80,7 +80,9 @@ void do_mouse_event( int event_type, int origin_x, int origin_y, int x, int y, i
     TRACE( "mouse_event event_type:%d, origin:(%d, %d), x:%d, y:%d, z:%d\n", event_type, origin_x, origin_y, x, y, z );
 
     if (get_emul_multi_touch_state()->multitouch_enable == 1) {
-        maru_finger_processing(event_type, origin_x, origin_y, x, y);
+        maru_finger_processing_A(event_type, origin_x, origin_y, x, y);
+    } else if (get_emul_multi_touch_state()->multitouch_enable == 2) {
+        maru_finger_processing_B(event_type, origin_x, origin_y, x, y);
     }
     else if ( MOUSE_DOWN == event_type || MOUSE_DRAG == event_type) { //single touch
         kbd_mouse_event(x, y, z, 1);
@@ -108,7 +110,7 @@ void do_key_event( int event_type, int keycode, int key_location )
         if (keycode == JAVA_KEYCODE_BIT_CTRL) {
             if (KEY_PRESSED == event_type) {
                 get_emul_multi_touch_state()->multitouch_enable = 1;
-                INFO("multi-touch enabled\n");
+                INFO("multi-touch enabled = A\n");
             } else if (KEY_RELEASED == event_type) {
                 get_emul_multi_touch_state()->multitouch_enable = 0;
                 clear_finger_slot();
@@ -121,6 +123,14 @@ void do_key_event( int event_type, int keycode, int key_location )
                 clear_finger_slot();
                 INFO("multi-touch disabled\n");
             }
+        } else if (keycode == (JAVA_KEYCODE_BIT_SHIFT | JAVA_KEYCODE_BIT_CTRL)) {
+            if (KEY_PRESSED == event_type) {
+                get_emul_multi_touch_state()->multitouch_enable = 2;
+                INFO("multi-touch enabled = B\n");
+            } else if (KEY_RELEASED == event_type) {
+                get_emul_multi_touch_state()->multitouch_enable = 1;
+                INFO("multi-touch enabled = A\n");
+            }
         }
     }