| 1775 | |
| 1776 | #if SDL_HAVE_YUV |
| 1777 | static void |
| 1778 | SDL_UnlockTextureYUV(SDL_Texture * texture) |
| 1779 | { |
| 1780 | SDL_Texture *native = texture->native; |
| 1781 | void *native_pixels = NULL; |
| 1782 | int native_pitch = 0; |
| 1783 | SDL_Rect rect; |
| 1784 | |
| 1785 | rect.x = 0; |
| 1786 | rect.y = 0; |
| 1787 | rect.w = texture->w; |
| 1788 | rect.h = texture->h; |
| 1789 | |
| 1790 | if (SDL_LockTexture(native, &rect, &native_pixels, &native_pitch) < 0) { |
| 1791 | return; |
| 1792 | } |
| 1793 | SDL_SW_CopyYUVToRGB(texture->yuv, &rect, native->format, |
| 1794 | rect.w, rect.h, native_pixels, native_pitch); |
| 1795 | SDL_UnlockTexture(native); |
| 1796 | } |
| 1797 | #endif /* SDL_HAVE_YUV */ |
| 1798 | |
| 1799 | static void |
no test coverage detected