From: jinhyung.jo Date: Wed, 10 Jul 2013 12:04:21 +0000 (+0900) Subject: Display : first fix for display error. X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~900^2~15^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f30974ea77077e9c07013fc1fa0265e83e75c5ca;p=sdk%2Femulator%2Fqemu.git Display : first fix for display error. fix the error that died of emulator caused from SEGV Change-Id: Icba860d25f480822729c87f403d28066aaea21d7 Signed-off-by: Jinhyung Jo --- diff --git a/tizen/src/hw/maru_brightness.c b/tizen/src/hw/maru_brightness.c index f572d45978..66551255c4 100644 --- a/tizen/src/hw/maru_brightness.c +++ b/tizen/src/hw/maru_brightness.c @@ -130,8 +130,12 @@ static void brightness_reg_write(void *opaque, if (brightness_off == val) { return; } - brightness_off = val; + if (brightness_image) { + pixman_image_unref(brightness_image); + } + level_color.alpha = 0xFF << 8; + brightness_image = pixman_image_create_solid_fill(&level_color); #ifdef TARGET_ARM graphic_hw_invalidate(NULL); diff --git a/tizen/src/maru_sdl.c b/tizen/src/maru_sdl.c index ffbc50a99a..1ebd9195c1 100644 --- a/tizen/src/maru_sdl.c +++ b/tizen/src/maru_sdl.c @@ -99,7 +99,7 @@ static void maru_do_pixman_sdl(pixman_image_t *dst_image) overlay1_width, overlay1_height); } /* apply the brightness level */ - if (brightness_level < BRIGHTNESS_MAX) { + if (brightness_off || (brightness_level < BRIGHTNESS_MAX)) { pixman_image_composite(PIXMAN_OP_OVER, brightness_image, NULL, dst_image, 0, 0, 0, 0, 0, 0, @@ -324,6 +324,7 @@ static void qemu_ds_sdl_refresh(DisplayChangeListener *dcl) true); pthread_mutex_unlock(&sdl_mutex); + graphic_hw_invalidate(NULL); sdl_skip_update = 0; sdl_skip_count = 0; break; @@ -344,14 +345,14 @@ static void qemu_ds_sdl_refresh(DisplayChangeListener *dcl) When the LCD is turned off, ten more updates the screen for a black screen. */ if (brightness_off) { - dpy_gfx_update(dcl->con, 0, 0, 0, 0); + qemu_ds_sdl_update(NULL, 0, 0, 0, 0); if (++sdl_skip_count > 10) { sdl_skip_update = 1; } else { sdl_skip_update = 0; } } else { - graphic_hw_update(dcl->con); + graphic_hw_update(NULL); sdl_skip_count = 0; sdl_skip_update = 0; } diff --git a/tizen/src/maru_shm.c b/tizen/src/maru_shm.c index c1b938f07d..087b245b25 100644 --- a/tizen/src/maru_shm.c +++ b/tizen/src/maru_shm.c @@ -74,7 +74,7 @@ static void maru_do_pixman_shm(void) overlay1_width, overlay1_height); } /* apply the brightness level */ - if (brightness_level < BRIGHTNESS_MAX) { + if (brightness_off || (brightness_level < BRIGHTNESS_MAX)) { pixman_image_composite(PIXMAN_OP_OVER, brightness_image, NULL, shm_surface->image, 0, 0, 0, 0, 0, 0, @@ -146,14 +146,14 @@ static void qemu_ds_shm_refresh(DisplayChangeListener *dcl) But when the display is turned off, ten more updates the surface for a black screen. */ if (brightness_off) { - dpy_gfx_update(dcl->con, 0, 0, 0, 0); + qemu_ds_shm_update(NULL, 0, 0, 0, 0); if (++shm_skip_count > 10) { shm_skip_update = 1; } else { shm_skip_update = 0; } } else { - graphic_hw_update(dcl->con); + graphic_hw_update(NULL); shm_skip_count = 0; shm_skip_update = 0; }