Added optimized YUV texture upload path with SDL_UpdateYUVTexture()

This commit is contained in:
Sam Lantinga 2013-09-28 14:06:47 -07:00
parent 45bd5e2b83
commit 43cc5c1cbb
6 changed files with 229 additions and 0 deletions

View file

@ -89,6 +89,11 @@ struct SDL_Renderer
int (*UpdateTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect, const void *pixels,
int pitch);
int (*UpdateTextureYUV) (SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect,
const Uint8 *Yplane, int Ypitch,
const Uint8 *Uplane, int Upitch,
const Uint8 *Vplane, int Vpitch);
int (*LockTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * rect, void **pixels, int *pitch);
void (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture);