From 50986dcf467f793aec7e3ec2005d1f0c7b64758e Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sun, 10 Sep 2017 14:34:13 -0400 Subject: [PATCH] Perf: make SDL2 use an ARGB8888 texture, which is natively supported via some GPUs + drivers, such as on OSX. This can remove an extraneous pixel-format conversion. --- BasiliskII/src/SDL/video_sdl2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BasiliskII/src/SDL/video_sdl2.cpp b/BasiliskII/src/SDL/video_sdl2.cpp index 8db972b1..e1e7ea52 100644 --- a/BasiliskII/src/SDL/video_sdl2.cpp +++ b/BasiliskII/src/SDL/video_sdl2.cpp @@ -777,7 +777,7 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags } SDL_assert(sdl_texture == NULL); - sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_RGB888, SDL_TEXTUREACCESS_STREAMING, width, height); + sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, width, height); if (!sdl_texture) { shutdown_sdl_video(); return NULL;