MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / SDL_UnlockTextureYUV

Function SDL_UnlockTextureYUV

deps/SDL2/src/render/SDL_render.c:1777–1796  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1775
1776#if SDL_HAVE_YUV
1777static void
1778SDL_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
1799static void

Callers 1

SDL_UnlockTextureFunction · 0.85

Calls 3

SDL_LockTextureFunction · 0.85
SDL_SW_CopyYUVToRGBFunction · 0.85
SDL_UnlockTextureFunction · 0.85

Tested by

no test coverage detected