From: giwoong.kim Date: Tue, 16 Apr 2013 02:42:30 +0000 (+0900) Subject: display: skip the framebuffer copying X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1004 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4bffdb728494028a5df0dc91f2c51770aa651573;p=sdk%2Femulator%2Fqemu.git display: skip the framebuffer copying skip the framebuffer copyting when display is turned off on CONFIG_USE_SHM Signed-off-by: GiWoong Kim --- diff --git a/tizen/src/maru_shm.c b/tizen/src/maru_shm.c index 7a1577b4db..1f8beed562 100644 --- a/tizen/src/maru_shm.c +++ b/tizen/src/maru_shm.c @@ -29,6 +29,7 @@ #include "maru_shm.h" +#include "hw/maru_brightness.h" #include "emul_state.h" #include "debug_ch.h" @@ -40,8 +41,10 @@ MULTI_DEBUG_CHANNEL(tizen, maru_shm); -void *shared_memory = (void*) 0; -int skin_shmid; +static void *shared_memory = (void*) 0; +static int skin_shmid; + +static int shm_skip_update; void qemu_ds_shm_update(DisplayState *ds, int x, int y, int w, int h) { @@ -53,12 +56,29 @@ void qemu_ds_shm_update(DisplayState *ds, int x, int y, int w, int h) void qemu_ds_shm_resize(DisplayState *ds) { - //TODO: + TRACE("qemu_ds_shm_resize\n"); + + shm_skip_update = 0; } void qemu_ds_shm_refresh(DisplayState *ds) { + /* If the display is turned off, + the screen does not update until the it is turned on */ + if (shm_skip_update && brightness_off) { + return; + } + vga_hw_update(); + + /* Usually, continuously updated. + But when the display is turned off, + just once updates the surface for a black screen. */ + if (brightness_off) { + shm_skip_update = 1; + } else { + shm_skip_update = 0; + } } void maruskin_shm_init(uint64 swt_handle,