Mercurial > sdl-ios-xcode
comparison src/video/SDL_yuv.c @ 81:1a2723474f12
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.
author | Sam Lantinga <slouken@lokigames.com> |
---|---|
date | Mon, 25 Jun 2001 22:16:44 +0000 |
parents | 74212992fb08 |
children | e8157fcb3114 |
comparison
equal
deleted
inserted
replaced
80:8806bc1eb80e | 81:1a2723474f12 |
---|---|
46 SDL_Overlay *overlay; | 46 SDL_Overlay *overlay; |
47 | 47 |
48 overlay = NULL; | 48 overlay = NULL; |
49 | 49 |
50 /* Display directly on video surface, if possible */ | 50 /* Display directly on video surface, if possible */ |
51 #if 0 | 51 if ( getenv("SDL_VIDEO_YUV_DIRECT") ) { |
52 if ( (display == SDL_PublicSurface) && | 52 if ( (display == SDL_PublicSurface) && |
53 ((SDL_VideoSurface->format->BytesPerPixel == 2) || | 53 ((SDL_VideoSurface->format->BytesPerPixel == 2) || |
54 (SDL_VideoSurface->format->BytesPerPixel == 4)) ) { | 54 (SDL_VideoSurface->format->BytesPerPixel == 4)) ) { |
55 display = SDL_VideoSurface; | 55 display = SDL_VideoSurface; |
56 } | |
56 } | 57 } |
57 #endif | |
58 yuv_hwaccel = getenv("SDL_VIDEO_YUV_HWACCEL"); | 58 yuv_hwaccel = getenv("SDL_VIDEO_YUV_HWACCEL"); |
59 if ( ((display == SDL_VideoSurface) && video->CreateYUVOverlay) && | 59 if ( ((display == SDL_VideoSurface) && video->CreateYUVOverlay) && |
60 (!yuv_hwaccel || (atoi(yuv_hwaccel) > 0)) ) { | 60 (!yuv_hwaccel || (atoi(yuv_hwaccel) > 0)) ) { |
61 overlay = video->CreateYUVOverlay(this, w, h, format, display); | 61 overlay = video->CreateYUVOverlay(this, w, h, format, display); |
62 } | 62 } |