ARM: Fix "white screen" problem
authorMaksim Kozlov <m.kozlov@samsung.com>
Tue, 19 Jun 2012 12:06:03 +0000 (16:06 +0400)
committerEvgeny Voevodin <e.voevodin@samsung.com>
Fri, 22 Jun 2012 05:31:46 +0000 (09:31 +0400)
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.

tizen/src/maru_sdl.c

index 7fa72e6596abd9f4db0a3d0a1398d6fe2258a25c..fead9b398fd09cb91d38eadd1980af65ff1208c8 100644 (file)
@@ -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)