From 22fd4e15afb30930120b4766eaba697eb21dd5cf Mon Sep 17 00:00:00 2001 From: GiWoong Kim Date: Fri, 11 Oct 2013 14:55:12 +0900 Subject: [PATCH] display: modified SDL_SetVideoMode flag 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 --- tizen/src/maru_sdl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tizen/src/maru_sdl.c b/tizen/src/maru_sdl.c index 484bb62779..80ab8fdb9b 100644 --- a/tizen/src/maru_sdl.c +++ b/tizen/src/maru_sdl.c @@ -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; -- 2.34.1