Lines Matching refs:surface

253     SDL_Surface *volatile surface;  in IMG_LoadPNG_RW()  local
280 png_ptr = NULL; info_ptr = NULL; row_pointers = NULL; surface = NULL; in IMG_LoadPNG_RW()
393 surface = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, in IMG_LoadPNG_RW()
395 if ( surface == NULL ) { in IMG_LoadPNG_RW()
403 ckey = SDL_MapRGB(surface->format, in IMG_LoadPNG_RW()
408 SDL_SetColorKey(surface, SDL_TRUE, ckey); in IMG_LoadPNG_RW()
419 (Uint8 *)surface->pixels + row*surface->pitch; in IMG_LoadPNG_RW()
434 palette = surface->format->palette; in IMG_LoadPNG_RW()
467 if ( surface ) { in IMG_LoadPNG_RW()
468 SDL_FreeSurface(surface); in IMG_LoadPNG_RW()
469 surface = NULL; in IMG_LoadPNG_RW()
473 return(surface); in IMG_LoadPNG_RW()
506 int IMG_SavePNG(SDL_Surface *surface, const char *file) in IMG_SavePNG() argument
510 return IMG_SavePNG_RW(surface, dst, 1); in IMG_SavePNG()
534 static int IMG_SavePNG_RW_libpng(SDL_Surface *surface, SDL_RWops *dst, int freedst) in IMG_SavePNG_RW_libpng() argument
540 SDL_Surface *source = surface; in IMG_SavePNG_RW_libpng()
569 palette = surface->format->palette; in IMG_SavePNG_RW_libpng()
589 else if (surface->format->format != png_format) { in IMG_SavePNG_RW_libpng()
590 source = SDL_ConvertSurfaceFormat(surface, png_format, 0); in IMG_SavePNG_RW_libpng()
595 lib.png_set_IHDR(png_ptr, info_ptr, surface->w, surface->h, in IMG_SavePNG_RW_libpng()
617 if (source != surface) { in IMG_SavePNG_RW_libpng()
650 static int IMG_SavePNG_RW_miniz(SDL_Surface *surface, SDL_RWops *dst, int freedst) in IMG_SavePNG_RW_miniz() argument
658 if (surface->format->format == png_format) { in IMG_SavePNG_RW_miniz()
659 …l_write_image_to_png_file_in_memory(surface->pixels, surface->w, surface->h, surface->format->Byte… in IMG_SavePNG_RW_miniz()
661 SDL_Surface *cvt = SDL_ConvertSurfaceFormat(surface, png_format, 0); in IMG_SavePNG_RW_miniz()
684 int IMG_SavePNG_RW(SDL_Surface *surface, SDL_RWops *dst, int freedst) in IMG_SavePNG_RW() argument
686 static int (*rw_func)(SDL_Surface *surface, SDL_RWops *dst, int freedst); in IMG_SavePNG_RW()
698 return rw_func(surface, dst, freedst); in IMG_SavePNG_RW()