mirror of
https://github.com/joel16/SDL2.git
synced 2024-12-04 17:44:35 +00:00
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
This commit is contained in:
parent
3fe72f0ebb
commit
143a1a0938
@ -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)) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user