From: Maksim Kozlov Date: Tue, 19 Jun 2012 12:06:03 +0000 (+0400) Subject: ARM: Fix "white screen" problem X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1405^2~104 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b9a224751432537d24500c8dcd934eeca46d7257;p=sdk%2Femulator%2Fqemu.git ARM: Fix "white screen" problem There was a problem with redrawing of the emulator screen by some window managers. This problem appears only on ARM emulator with exynos4210 FIMD usage. Also, this problem doesn't appear when SDL window isn't integrated into emulator skin with SWT.EMBEDDED flag. Normally (without skin) the host window system repairs window when receives the paint event. But in our case this events is caught by SWT library and window system doesn't do that. We should do that by ourself. maru_vga update the window continuously. But exynos4210 FIMD calls update function only when there are changes on the screen. So sometimes we can see the "white screen" until click in the screen. If we fix that in the FIMD, we will get overhead. SDL more suuitable for that. --- diff --git a/tizen/src/maru_sdl.c b/tizen/src/maru_sdl.c index 7fa72e6596..fead9b398f 100644 --- a/tizen/src/maru_sdl.c +++ b/tizen/src/maru_sdl.c @@ -109,15 +109,15 @@ static void qemu_update(void) #ifdef SDL_THREAD static void* run_qemu_update(void* arg) { - while(1) { + while(1) { pthread_mutex_lock(&sdl_mutex); - pthread_cond_wait(&sdl_cond, &sdl_mutex); + pthread_cond_wait(&sdl_cond, &sdl_mutex); qemu_update(); pthread_mutex_unlock(&sdl_mutex); - } + } return NULL; } @@ -281,6 +281,23 @@ static void qemu_ds_refresh(DisplayState *ds) break; } } + +#ifdef TARGET_ARM +#ifdef SDL_THREAD + pthread_mutex_lock(&sdl_mutex); +#endif + + /* + * It is necessary only for exynos4210 FIMD in connection with + * some WM (xfwm4, for example) + */ + + SDL_UpdateRect(surface_screen, 0, 0, 0, 0); + +#ifdef SDL_THREAD + pthread_mutex_unlock(&sdl_mutex); +#endif +#endif } void maruskin_display_init(DisplayState *ds)