display: modified SDL_SetVideoMode flag 66/10766/1
authorGiWoong Kim <giwoong.kim@samsung.com>
Fri, 11 Oct 2013 05:55:12 +0000 (14:55 +0900)
committerGiWoong Kim <giwoong.kim@samsung.com>
Fri, 11 Oct 2013 05:57:17 +0000 (14:57 +0900)
Use SDL_SWSURFACE if you plan on doing per-pixel manipulations,
or blit surfaces with alpha channels, and require a high framerate.
When you use hardware surfaces, SDL copies the surfaces from video
memory to system memory when you lock them, and back when you unlock
them. This can cause a major performance hit.
 Be aware that you may request a hardware surface, but receive a
software surface because the video driver doesn't support hardware
surface. Many platforms can only provide a hardware surface when
using SDL_FULLSCREEN. The SDL_HWSURFACE flag is best used when
the surfaces you'll be blitting can also be stored in video memory.

Change-Id: I07484f931ac2956bb386234a0524066ee70cce1f
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
tizen/src/maru_sdl.c

index 484bb627791421478301152000ef12696a41b618..80ab8fdb9b11ef567a805ca2600bc70473a1812c 100644 (file)
@@ -78,7 +78,7 @@ static pthread_cond_t sdl_cond = PTHREAD_COND_INITIALIZER;
 static int sdl_thread_initialized;
 #endif
 
-#define SDL_FLAGS (SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL | SDL_NOFRAME)
+#define SDL_FLAGS (SDL_SWSURFACE | SDL_ASYNCBLIT | SDL_NOFRAME)
 #define SDL_BPP 32
 
 /* Image processing functions using the pixman library */
@@ -717,7 +717,7 @@ static void maru_sdl_resize_bh(void *opaque)
     INFO("SDL_SetVideoMode\n");
 
     if (surface_screen == NULL) {
-        ERR("Could not open SDL display (%dx%dx%d): %s\n",
+        ERR("Could not open SDL display (%dx%dx%d) : %s\n",
             surface_width, surface_height,
             get_emul_sdl_bpp(), SDL_GetError());
         return;