display : reduce the spend-time when the display rotate/scale.(for SDL method)
authorjinhyung.jo <jinhyung.jo@samsung.com>
Tue, 2 Jul 2013 04:21:45 +0000 (13:21 +0900)
committerjinhyung.jo <jinhyung.jo@samsung.com>
Tue, 2 Jul 2013 04:37:09 +0000 (13:37 +0900)
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 <jinhyung.jo@samsung.com>
tizen/src/skin/maruskin_operation.c
tizen/src/skin/maruskin_operation.h
tizen/src/skin/maruskin_server.c

index 65c6b3dd29c5fd507935c6c7ba27d428e01b2bc6..520e8c5bb7307a8ffcc00d258c86108adfc10aa7 100644 (file)
@@ -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)
index 1c03d866748b7d6bd4fea77207aa5b190e6492b3..0ef20c90e991d28253f1d185512411486abbeb64 100644 (file)
@@ -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);
index 5b1a42026c9fd18bb3dd3cb094ab0406b79156af..ba1c07006896ccfe38d2e07590e916ec0d748a96 100644 (file)
@@ -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: {