Commit 143a1a09 authored by Sam Lantinga's avatar Sam Lantinga

Added the SDL_VIDEO_YUV_DIRECT hack for better performance when the

requested video mode is 16 bpp but the real video mode is 32 bpp.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%4082
parent 3fe72f0e
......@@ -48,13 +48,13 @@ SDL_Overlay *SDL_CreateYUVOverlay(int w, int h, Uint32 format,
overlay = NULL;
/* Display directly on video surface, if possible */
#if 0
if ( (display == SDL_PublicSurface) &&
((SDL_VideoSurface->format->BytesPerPixel == 2) ||
(SDL_VideoSurface->format->BytesPerPixel == 4)) ) {
display = SDL_VideoSurface;
if ( getenv("SDL_VIDEO_YUV_DIRECT") ) {
if ( (display == SDL_PublicSurface) &&
((SDL_VideoSurface->format->BytesPerPixel == 2) ||
(SDL_VideoSurface->format->BytesPerPixel == 4)) ) {
display = SDL_VideoSurface;
}
}
#endif
yuv_hwaccel = getenv("SDL_VIDEO_YUV_HWACCEL");
if ( ((display == SDL_VideoSurface) && video->CreateYUVOverlay) &&
(!yuv_hwaccel || (atoi(yuv_hwaccel) > 0)) ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment