From 77fe18516aac9c40f5fbe6120f49b16a012e03ef Mon Sep 17 00:00:00 2001 From: "jinhyung.jo" Date: Tue, 2 Jul 2013 13:21:45 +0900 Subject: [PATCH] display : reduce the spend-time when the display rotate/scale.(for SDL method) remove unnecessary realloc routine for the display surface. modified to create the SDL surface before send a event to emuld. Signed-off-by: Jinhyung Jo --- tizen/src/skin/maruskin_operation.c | 11 ++++++++--- tizen/src/skin/maruskin_operation.h | 1 + tizen/src/skin/maruskin_server.c | 6 ++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/tizen/src/skin/maruskin_operation.c b/tizen/src/skin/maruskin_operation.c index 65c6b3dd29..520e8c5bb7 100644 --- a/tizen/src/skin/maruskin_operation.c +++ b/tizen/src/skin/maruskin_operation.c @@ -304,6 +304,14 @@ void do_rotation_event(int rotation_type) INFO( "do_rotation_event rotation_type:%d\n", rotation_type); + set_emul_rotation( rotation_type ); +} + +void send_rotation_event(int rotation_type) +{ + + INFO( "send_rotation_event rotation_type:%d\n", rotation_type); + char send_buf[32] = { 0 }; switch ( rotation_type ) { @@ -325,9 +333,6 @@ void do_rotation_event(int rotation_type) } send_to_emuld( "sensor\n\n\n\n", 10, send_buf, 32 ); - - set_emul_rotation( rotation_type ); - } QemuSurfaceInfo* get_screenshot_info(void) diff --git a/tizen/src/skin/maruskin_operation.h b/tizen/src/skin/maruskin_operation.h index 1c03d86674..0ef20c90e9 100644 --- a/tizen/src/skin/maruskin_operation.h +++ b/tizen/src/skin/maruskin_operation.h @@ -57,6 +57,7 @@ void do_key_event(int event_type, void do_hardkey_event(int event_type, int keycode); void do_scale_event(double scale_factor); void do_rotation_event(int rotation_type); +void send_rotation_event(int rotation_type); QemuSurfaceInfo *get_screenshot_info(void); DetailInfo *get_detail_info(int qemu_argc, char **qemu_argv); diff --git a/tizen/src/skin/maruskin_server.c b/tizen/src/skin/maruskin_server.c index 5b1a42026c..ba1c070068 100644 --- a/tizen/src/skin/maruskin_server.c +++ b/tizen/src/skin/maruskin_server.c @@ -878,6 +878,7 @@ static void* run_skin_server(void* args) int scale = 0; double scale_ratio = 0.0; short rotation_type = 0; + int is_rotate = 0; char* p = recvbuf; memcpy( &scale, p, sizeof( scale ) ); @@ -894,11 +895,16 @@ static void* run_skin_server(void* args) if ( is_sensord_initialized == 1 && get_emul_rotation() != rotation_type ) { do_rotation_event( rotation_type ); + is_rotate = 1; } #ifndef CONFIG_USE_SHM maruskin_sdl_resize(); // send sdl event #endif + if (is_rotate) { + send_rotation_event( rotation_type ); + } + break; } case RECV_SCREEN_SHOT: { -- 2.34.1