From 5a3d42680d13ab7bdde3b17cf110c220f9f588c9 Mon Sep 17 00:00:00 2001 From: "giwoong.kim" Date: Mon, 15 Apr 2013 12:17:12 +0900 Subject: [PATCH] shm: copy JNI library file for CONFIG_USE_SHM copy JNI library file for CONFIG_USE_SHM on Linux Signed-off-by: GiWoong Kim --- tizen/src/Makefile | 16 ++++++++++++++++ tizen/src/Makefile.tizen | 6 ++++-- tizen/src/hw/maru_vga.c | 17 +++++++++++++---- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/tizen/src/Makefile b/tizen/src/Makefile index ab1cd2f692..324c2b003f 100755 --- a/tizen/src/Makefile +++ b/tizen/src/Makefile @@ -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 diff --git a/tizen/src/Makefile.tizen b/tizen/src/Makefile.tizen index 5b90201622..60276ccb66 100755 --- a/tizen/src/Makefile.tizen +++ b/tizen/src/Makefile.tizen @@ -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 diff --git a/tizen/src/hw/maru_vga.c b/tizen/src/hw/maru_vga.c index fbb7f81bf5..b932e039c7 100644 --- a/tizen/src/hw/maru_vga.c +++ b/tizen/src/hw/maru_vga.c @@ -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) { -- 2.34.1