display : Fixed a bug that appear a white region on the LCD.
authorjinhyung.jo <jinhyung.jo@samsung.com>
Fri, 24 May 2013 06:14:15 +0000 (15:14 +0900)
committergiwoong.kim <giwoong.kim@samsung.com>
Mon, 27 May 2013 03:01:02 +0000 (12:01 +0900)
Modified to avoid to appear a white region when screen is rotated or scaled up/down while powered off.
The method is that draw ten more blank screen when the skin is rotated or scaled up/down while powered off.

Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
tizen/src/maru_sdl.c

index efeae8893ac13e78692d2552b95f753d9001b7f8..9bb3f8d4d563f1f06ba8e2b0efe46b0d72a51593 100644 (file)
@@ -154,6 +154,7 @@ static int maru_sdl_poll_event(SDL_Event *ev)
 void qemu_ds_sdl_refresh(DisplayState *ds)
 {
     SDL_Event ev1, *ev = &ev1;
+    static uint32_t sdl_skip_count = 0;
 
     // surface may be NULL in init func.
     qemu_display_surface = ds->surface;
@@ -169,6 +170,7 @@ void qemu_ds_sdl_refresh(DisplayState *ds)
                 pthread_mutex_unlock(&sdl_mutex);
                 vga_hw_invalidate();
                 sdl_skip_update = 0;
+                sdl_skip_count = 0;
                 break;
             }
 
@@ -185,11 +187,16 @@ void qemu_ds_sdl_refresh(DisplayState *ds)
 
     /* Usually, continuously updated.
        When the LCD is turned off,
-       once updates the screen for a black screen. */
+       ten more updates the screen for a black screen. */
     vga_hw_update();
     if (brightness_off) {
-        sdl_skip_update = 1;
+        if (++sdl_skip_count > 10) {
+            sdl_skip_update = 1;
+        } else {
+            sdl_skip_update = 0;
+        }
     } else {
+        sdl_skip_count = 0;
         sdl_skip_update = 0;
     }