shm: copy JNI library file for CONFIG_USE_SHM
authorgiwoong.kim <giwoong.kim@samsung.com>
Mon, 15 Apr 2013 03:17:12 +0000 (12:17 +0900)
committergiwoong.kim <giwoong.kim@samsung.com>
Mon, 15 Apr 2013 07:31:24 +0000 (16:31 +0900)
copy JNI library file for CONFIG_USE_SHM on Linux

Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
tizen/src/Makefile
tizen/src/Makefile.tizen
tizen/src/hw/maru_vga.c

index ab1cd2f692e43c6995ba4ba973db671567180fa6..324c2b003f28e2c9d6cecd208802acf59391dd7e 100755 (executable)
@@ -125,8 +125,16 @@ else
        cp -pPR ../license $(EMUL_DIR)
        cp skin/client/lib/swt.jar $(EMUL_DIR)/bin/swt.jar
        cp -pPR skin/client/skins $(EMUL_DIR)
+endif
+
+ifdef CONFIG_USE_SHM
+ifdef CONFIG_DARWIN
        cp -pPR skin/client/native_src/libshared.dylib $(EMUL_DIR)/bin
 endif
+ifdef CONFIG_LINUX
+       cp -dpr skin/client/native_src/libshared.so $(EMUL_DIR)/bin
+endif
+endif
 
 ifdef CONFIG_DARWIN
        install_name_tool -change /opt/local/lib/libgthread-2.0.*.dylib @loader_path/libgthread-2.0.0.dylib $(EMUL_DIR)/bin/qemu-img
@@ -231,8 +239,16 @@ else
        cp ../../qemu-img $(DIBS_COMMON_DIR)/bin
        cp -pPR ../license $(DIBS_COMMON_DIR)
        cp -pPR skin/client/skins $(DIBS_COMMON_DIR)
+endif
+
+ifdef CONFIG_USE_SHM
+ifdef CONFIG_DARWIN
        cp -pPR skin/client/native_src/libshared.dylib $(DIBS_COMMON_DIR)/bin
 endif
+ifdef CONFIG_LINUX
+       cp -dpr skin/client/native_src/libshared.so $(DIBS_COMMON_DIR)/bin
+endif
+endif
 
 ifdef CONFIG_DARWIN
        install_name_tool -change /opt/local/lib/libgthread-2.0.*.dylib @loader_path/libgthread-2.0.0.dylib $(DIBS_COMMON_DIR)/bin/qemu-img 
index 5b90201622f3eed793de819d9ae454e5a68734a4..60276ccb6616a1611f6d9178c0a5750a110604b2 100755 (executable)
@@ -85,8 +85,10 @@ obj-y += osutil-darwin.o
 endif
 
 # maru display
-obj-y += maru_display.o maru_shm.o
-ifndef CONFIG_DARWIN
+obj-y += maru_display.o
+ifdef CONFIG_USE_SHM
+obj-y += maru_shm.o
+else
 obj-y += maru_sdl.o SDL_rotozoom.o maru_finger.o
 endif
 
index fbb7f81bf550ca7792833cff2d5ded6495cc998c..b932e039c7b2a6fcb73072aa580fdbce8740f0bc 100644 (file)
@@ -1488,23 +1488,32 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
         d += linesize;
     }
 
+//TODO: maru_shm
+#ifdef CONFIG_USE_SHM
+    /* for display updating */
+    memcpy(shared_memory, s->ds->surface->data,
+        s->ds->surface->linesize * s->ds->surface->height);
+#endif
+
+//TODO: maru_sdl
+#ifndef CONFIG_USE_SHM
     /* for screenshot */
     pthread_mutex_lock(&mutex_screenshot);
+
     MaruScreenshot* maru_screenshot = get_maru_screenshot();
     if (maru_screenshot) {
         maru_screenshot->isReady = 1;
+
         if (maru_screenshot->request_screenshot == 1) {
             memcpy(maru_screenshot->pixel_data, s->ds->surface->data, 
                 s->ds->surface->linesize * s->ds->surface->height);
             maru_screenshot->request_screenshot = 0;
+
             pthread_cond_signal(&cond_screenshot);
         }
     }
-    pthread_mutex_unlock(&mutex_screenshot);
 
-#ifdef CONFIG_USE_SHM
-    memcpy(shared_memory, s->ds->surface->data,
-        s->ds->surface->linesize * s->ds->surface->height);
+    pthread_mutex_unlock(&mutex_screenshot);
 #endif
 
     if (y_start >= 0) {