profile atlas recreation
This commit is contained in:
@ -186,6 +186,8 @@ static void upload_texture_from_surface(GPUTexture texture, SDL_Surface *surface
|
||||
|
||||
|
||||
static void recreate_current_atlas_texture(TextureCache *cache) {
|
||||
profile_start("atlas recreation");
|
||||
|
||||
/* TODO: should surfaces be freed after they cannot be referenced in atlas builing? */
|
||||
/* for example, if full page of 64x64 tiles was already filled, there's no real reason to process them further */
|
||||
SDL_Surface *atlas_surface = cache->atlas_surfaces[cache->atlas_index];
|
||||
@ -216,6 +218,8 @@ static void recreate_current_atlas_texture(TextureCache *cache) {
|
||||
|
||||
/* texturize it! */
|
||||
upload_texture_from_surface(cache->atlas_textures[cache->atlas_index], atlas_surface);
|
||||
|
||||
profile_end("atlas recreation");
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user