END_TEST START_TEST(eina_rectangle_pool_skyline) { Eina_Rectangle_Pool *pool; Eina_Rectangle *rects[8][8]; int x; int y; int w; int h; fail_if(!eina_init()); pool = eina_rectangle_pool_new(256, 256); fail_if(pool == NULL); eina_rectangle_pool_packing_set(pool, Eina_Packing_Bottom_Left_Skyline_Improved); eina_rectangle_pool_data_set(pool, rects); fail_if(eina_rectangle_pool_data_get(pool) != rects); fail_if(eina_rectangle_pool_request(pool, 1024, 1024) != NULL); for (x = 0; x < 8; x++) for (y = 0; y < 8; y++) { rects[x][y] = eina_rectangle_pool_request(pool, 32, 32); fail_if(rects[x][y] == NULL); } fail_if(eina_rectangle_pool_count(pool) != 64); fail_if(eina_rectangle_pool_get(rects[0][0]) != pool); fail_if(eina_rectangle_pool_geometry_get(pool, &w, &h) != EINA_TRUE); fail_if(w != 256 || h != 256); fail_if(eina_rectangle_pool_request(pool, 32, 32) != NULL); fail_if(eina_rectangle_pool_request(pool, 1024, 1024) != NULL); for (x = 0; x < 8; x++) eina_rectangle_pool_release(rects[0][x]); eina_rectangle_pool_free(pool); eina_shutdown(); }
static void _evas_gl_preload_main_loop_wakeup(void) { Evas_GL_Texture_Async_Preload *async; evas_gl_make_current_cb cb = async_gl_make_current; void *data = async_engine_data; Eina_Bool running = async_loader_running; if (running) evas_gl_preload_render_lock(cb, data); EINA_LIST_FREE(async_loader_todie, async) { Eo *target; if (async->tex) { EINA_LIST_FREE(async->tex->targets, target) evas_object_image_pixels_dirty_set(target, EINA_TRUE); } async->im->cache_entry.flags.preload_done = 0; if (async->tex) { async->tex->was_preloaded = EINA_TRUE; async->tex->ptt->allocations = eina_list_remove(async->tex->ptt->allocations, async->tex->aptt); eina_rectangle_pool_release(async->tex->aptt); async->tex->aptt = NULL; pt_unref(async->tex->ptt); async->tex->ptt = NULL; evas_gl_common_texture_free(async->tex, EINA_FALSE); } #ifdef EVAS_CSERVE2 if (evas_cache2_image_cached(&async->im->cache_entry)) evas_cache2_image_close(&async->im->cache_entry); else #endif evas_cache_image_drop(&async->im->cache_entry); free(async); }