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

Function SDL_UnlockTexture

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

Source from the content-addressed store, hash-verified

1818}
1819
1820void
1821SDL_UnlockTexture(SDL_Texture * texture)
1822{
1823 CHECK_TEXTURE_MAGIC(texture, );
1824
1825 if (texture->access != SDL_TEXTUREACCESS_STREAMING) {
1826 return;
1827 }
1828#if SDL_HAVE_YUV
1829 if (texture->yuv) {
1830 SDL_UnlockTextureYUV(texture);
1831 } else
1832#endif
1833 if (texture->native) {
1834 SDL_UnlockTextureNative(texture);
1835 } else {
1836 SDL_Renderer *renderer = texture->renderer;
1837 renderer->UnlockTexture(renderer, texture);
1838 }
1839
1840 SDL_FreeSurface(texture->locked_surface);
1841 texture->locked_surface = NULL;
1842}
1843
1844SDL_bool
1845SDL_RenderTargetSupported(SDL_Renderer *renderer)

Callers 7

UpdateTextureFunction · 0.85
SDL_UpdateTextureYUVFunction · 0.85
SDL_UpdateTextureNativeFunction · 0.85
SDL_LockTextureToSurfaceFunction · 0.85
SDL_UnlockTextureYUVFunction · 0.85
SDL_UnlockTextureNativeFunction · 0.85

Calls 3

SDL_UnlockTextureYUVFunction · 0.85
SDL_UnlockTextureNativeFunction · 0.85
SDL_FreeSurfaceFunction · 0.85

Tested by 1

UpdateTextureFunction · 0.68