Function fermium::surface::SDL_CreateRGBSurfaceFrom [−][src]
pub unsafe extern "C" fn SDL_CreateRGBSurfaceFrom(
pixels: *mut c_void,
width: c_int,
height: c_int,
depth: c_int,
pitch: c_int,
Rmask: u32,
Gmask: u32,
Bmask: u32,
Amask: u32
) -> *mut SDL_Surface
Makes a surface from a pre-allocated buffer.
The surface depends on the pixels allocation for its lifetime, but has the
PRE_ALLOC
flag so it won’t free the pixels on its own. In other words,
this works like a borrow rather than like an ownership transfer.