From 4bffdb728494028a5df0dc91f2c51770aa651573 Mon Sep 17 00:00:00 2001 From: "giwoong.kim" Date: Tue, 16 Apr 2013 11:42:30 +0900 Subject: [PATCH] display: skip the framebuffer copying skip the framebuffer copyting when display is turned off on CONFIG_USE_SHM Signed-off-by: GiWoong Kim --- tizen/src/maru_shm.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) 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, -- 2.34.1