Home
last modified time | relevance | path

Searched refs:cache (Results 1 – 25 of 85) sorted by relevance

1234

/lvgl-latest/src/misc/cache/
Dlv_cache.c26 static void cache_drop_internal_no_lock(lv_cache_t * cache, const void * key, void * user_data);
27 static bool cache_evict_one_internal_no_lock(lv_cache_t * cache, void * user_data);
28 static lv_cache_entry_t * cache_add_internal_no_lock(lv_cache_t * cache, const void * key, void * u…
50 lv_cache_t * cache = cache_class->alloc_cb(); in lv_cache_create() local
51 LV_ASSERT_MALLOC(cache); in lv_cache_create()
53 cache->clz = cache_class; in lv_cache_create()
54 cache->node_size = node_size; in lv_cache_create()
55 cache->max_size = max_size; in lv_cache_create()
56 cache->size = 0; in lv_cache_create()
57 cache->ops = ops; in lv_cache_create()
[all …]
Dlv_cache_lru_rb.c64 lv_cache_t cache; member
77 static bool init_cnt_cb(lv_cache_t * cache);
78 static bool init_size_cb(lv_cache_t * cache);
79 static void destroy_cb(lv_cache_t * cache, void * user_data);
81 static lv_cache_entry_t * get_cb(lv_cache_t * cache, const void * key, void * user_data);
82 static lv_cache_entry_t * add_cb(lv_cache_t * cache, const void * key, void * user_data);
83 static void remove_cb(lv_cache_t * cache, lv_cache_entry_t * entry, void * user_data);
84 static void drop_cb(lv_cache_t * cache, const void * key, void * user_data);
85 static void drop_all_cb(lv_cache_t * cache, void * user_data);
86 static lv_cache_entry_t * get_victim_cb(lv_cache_t * cache, void * user_data);
[all …]
Dlv_cache.h57 void lv_cache_destroy(lv_cache_t * cache, void * user_data);
67 lv_cache_entry_t * lv_cache_acquire(lv_cache_t * cache, const void * key, void * user_data);
80 lv_cache_entry_t * lv_cache_acquire_or_create(lv_cache_t * cache, const void * key, void * user_dat…
89 lv_cache_entry_t * lv_cache_add(lv_cache_t * cache, const void * key, void * user_data);
98 void lv_cache_release(lv_cache_t * cache, lv_cache_entry_t * entry, void * user_data);
108 void lv_cache_reserve(lv_cache_t * cache, uint32_t reserved_size, void * user_data);
119 void lv_cache_drop(lv_cache_t * cache, const void * key, void * user_data);
127 void lv_cache_drop_all(lv_cache_t * cache, void * user_data);
135 bool lv_cache_evict_one(lv_cache_t * cache, void * user_data);
146 void lv_cache_set_max_size(lv_cache_t * cache, size_t max_size, void * user_data);
[all …]
Dlv_cache_private.h60 typedef bool (*lv_cache_init_cb_t)(lv_cache_t * cache);
65 typedef void (*lv_cache_destroy_cb_t)(lv_cache_t * cache, void * user_data);
71 typedef lv_cache_entry_t * (*lv_cache_get_cb_t)(lv_cache_t * cache, const void * key, void * user_d…
78 typedef lv_cache_entry_t * (*lv_cache_add_cb_t)(lv_cache_t * cache, const void * key, void * user_d…
84 typedef void (*lv_cache_remove_cb_t)(lv_cache_t * cache, lv_cache_entry_t * entry, void * user_data…
89 typedef void (*lv_cache_drop_cb_t)(lv_cache_t * cache, const void * key, void * user_data);
94 typedef void (*lv_cache_drop_all_cb_t)(lv_cache_t * cache, void * user_data);
99 typedef lv_cache_entry_t * (*lv_cache_get_victim_cb)(lv_cache_t * cache, void * user_data);
105 typedef lv_cache_reserve_cond_res_t (*lv_cache_reserve_cond_cb)(lv_cache_t * cache, const void * ke…
112 typedef lv_iter_t * (*lv_cache_iter_create_cb)(lv_cache_t * cache);
Dlv_cache_entry.c24 const lv_cache_t * cache; member
134 void lv_cache_entry_set_cache(lv_cache_entry_t * entry, const lv_cache_t * cache) in lv_cache_entry_set_cache() argument
137 entry->cache = cache; in lv_cache_entry_set_cache()
143 return entry->cache; in lv_cache_entry_get_cache()
151 lv_cache_entry_t * lv_cache_entry_alloc(const uint32_t node_size, const lv_cache_t * cache) in lv_cache_entry_alloc() argument
160 lv_cache_entry_init(entry, cache, node_size); in lv_cache_entry_alloc()
164 void lv_cache_entry_init(lv_cache_entry_t * entry, const lv_cache_t * cache, const uint32_t node_si… in lv_cache_entry_init() argument
167 LV_ASSERT_NULL(cache); in lv_cache_entry_init()
169 entry->cache = cache; in lv_cache_entry_init()
Dlv_cache_entry.h86 lv_cache_entry_t * lv_cache_entry_alloc(const uint32_t node_size, const lv_cache_t * cache);
94 void lv_cache_entry_init(lv_cache_entry_t * entry, const lv_cache_t * cache, const uint32_t node_si…
Dlv_cache_entry_private.h36 void lv_cache_entry_set_cache(lv_cache_entry_t * entry, const lv_cache_t * cache);
/lvgl-latest/src/misc/
Dlv_lru.c44 static uint32_t lv_lru_hash(lv_lru_t * cache, const void * key, uint32_t key_length);
50 static void lv_lru_remove_item(lv_lru_t * cache, lv_lru_item_t * prev, lv_lru_item_t * item, uint32…
53 static lv_lru_item_t * lv_lru_pop_or_create_item(lv_lru_t * cache);
65 #define test_for_missing_cache() error_for(!cache, LV_LRU_MISSING_CACHE)
68 #define test_for_value_too_large() error_for(value_length > cache->total_memory, LV_LRU_VALUE_TO…
78 lv_lru_t * cache = lv_malloc_zeroed(sizeof(lv_lru_t)); in lv_lru_create() local
79 if(!cache) { in lv_lru_create()
83 cache->hash_table_size = cache_size / average_length; in lv_lru_create()
84 cache->average_item_length = average_length; in lv_lru_create()
85 cache->free_memory = cache_size; in lv_lru_create()
[all …]
Dlv_fs.c122 file_p->cache = lv_malloc_zeroed(sizeof(lv_fs_file_cache_t)); in lv_fs_open()
123 LV_ASSERT_MALLOC(file_p->cache); in lv_fs_open()
128 file_p->cache->buffer = (void *)path_ex->buffer; in lv_fs_open()
129 file_p->cache->start = 0; in lv_fs_open()
130 file_p->cache->file_position = 0; in lv_fs_open()
131 file_p->cache->end = path_ex->size; in lv_fs_open()
135 file_p->cache->start = UINT32_MAX; in lv_fs_open()
136 file_p->cache->end = UINT32_MAX - 1; in lv_fs_open()
168 if(file_p->drv->cache_size && file_p->cache) { in lv_fs_close()
170 if(file_p->drv->cache_size != LV_FS_CACHE_FROM_BUFFER && file_p->cache->buffer) { in lv_fs_close()
[all …]
Dlv_lru.h62 void lv_lru_delete(lv_lru_t * cache);
64 lv_lru_res_t lv_lru_set(lv_lru_t * cache, const void * key, size_t key_length, void * value, size_t…
66 lv_lru_res_t lv_lru_get(lv_lru_t * cache, const void * key, size_t key_size, void ** value);
68 lv_lru_res_t lv_lru_remove(lv_lru_t * cache, const void * key, size_t key_size);
75 void lv_lru_remove_lru_item(lv_lru_t * cache);
/lvgl-latest/tests/src/test_cases/cache/
Dtest_cache.c14 lv_cache_t * cache; variable
52 cache = lv_cache_create(&lv_cache_class_lru_rb_size, sizeof(test_data), CACHE_SIZE_BYTES, ops); in setUp()
58 lv_cache_destroy(cache, NULL); in tearDown()
59 cache = NULL; in tearDown()
81 lv_cache_entry_t * entry = lv_cache_acquire(cache, &search_key, NULL); in test_cache_1()
87 entry = lv_cache_add(cache, &search_key, NULL); in test_cache_1()
100 lv_cache_release(cache, entry, NULL); in test_cache_1()
105 … TEST_PRINTF("cache free: %d, allocated: %d", lv_cache_get_free_size(cache, NULL), curr_mem_size); in test_cache_1()
114 TEST_ASSERT_EQUAL(8, lv_cache_get_free_size(cache, NULL)); in test_cache_1()
123 lv_cache_entry_t * entry_key32 = lv_cache_acquire(cache, &search_key32, NULL); in test_cache_1()
[all …]
/lvgl-latest/src/libs/fsdrv/
Dlv_fs_memfs.c179 fp->cache->file_position = pos; in fs_seek()
183 fp->cache->file_position += pos; in fs_seek()
187 fp->cache->file_position = fp->cache->end - pos; in fs_seek()
191 if(fp->cache->file_position < fp->cache->start) in fs_seek()
192 fp->cache->file_position = fp->cache->start; in fs_seek()
193 else if(fp->cache->file_position > fp->cache->end) in fs_seek()
194 fp->cache->file_position = fp->cache->end; in fs_seek()
209 *pos_p = ((lv_fs_file_t *)file_p)->cache->file_position; in fs_tell()
/lvgl-latest/src/draw/sw/blend/
Dlv_draw_sw_blend_to_al88.c74 static void lv_color_mix_with_alpha_cache_init(lv_color_mix_alpha_cache_t * cache);
77 … lv_blend_mode_t mode, lv_color_mix_alpha_cache_t * cache);
86 … lv_color_mix_alpha_cache_t * cache);
206 lv_color_mix_alpha_cache_t cache; in lv_draw_sw_blend_color_to_al88() local
207 lv_color_mix_with_alpha_cache_init(&cache); in lv_draw_sw_blend_color_to_al88()
267 lv_color_16a_16a_mix(color16a, &dest_buf[x], &cache); in lv_draw_sw_blend_color_to_al88()
283 lv_color_16a_16a_mix(color16a, &dest_buf[x], &cache); in lv_draw_sw_blend_color_to_al88()
300 lv_color_16a_16a_mix(color16a, &dest_buf[x], &cache); in lv_draw_sw_blend_color_to_al88()
367 lv_color_mix_alpha_cache_t cache; in i1_image_blend() local
368 lv_color_mix_with_alpha_cache_init(&cache); in i1_image_blend()
[all …]
Dlv_draw_sw_blend_to_argb8888.c77 … lv_color_mix_alpha_cache_t * cache);
79 static void lv_color_mix_with_alpha_cache_init(lv_color_mix_alpha_cache_t * cache);
82 … lv_blend_mode_t mode, lv_color_mix_alpha_cache_t * cache);
218 lv_color_mix_alpha_cache_t cache; in lv_draw_sw_blend_color_to_argb8888() local
219 lv_color_mix_with_alpha_cache_init(&cache); in lv_draw_sw_blend_color_to_argb8888()
277 dest_buf[x] = lv_color_32_32_mix(color_argb, dest_buf[x], &cache); in lv_draw_sw_blend_color_to_argb8888()
292 dest_buf[x] = lv_color_32_32_mix(color_argb, dest_buf[x], &cache); in lv_draw_sw_blend_color_to_argb8888()
309 dest_buf[x] = lv_color_32_32_mix(color_argb, dest_buf[x], &cache); in lv_draw_sw_blend_color_to_argb8888()
438 lv_color_mix_alpha_cache_t cache; in i1_image_blend() local
439 lv_color_mix_with_alpha_cache_init(&cache); in i1_image_blend()
[all …]
/lvgl-latest/src/drivers/uefi/
Dlv_uefi_indev_keyboard.c246 lv_uefi_simple_text_input_key_cache_t * cache = NULL; in _simple_text_input_read() local
263 cache = (lv_uefi_simple_text_input_key_cache_t *) lv_ll_ins_tail(&indev_ctx->key_cache); in _simple_text_input_read()
264 LV_ASSERT_MALLOC(cache); in _simple_text_input_read()
265 cache->key = key; in _simple_text_input_read()
266 cache->pressed = true; in _simple_text_input_read()
269 cache = (lv_uefi_simple_text_input_key_cache_t *) lv_ll_ins_tail(&indev_ctx->key_cache); in _simple_text_input_read()
270 LV_ASSERT_MALLOC(cache); in _simple_text_input_read()
271 cache->key = key; in _simple_text_input_read()
272 cache->pressed = false; in _simple_text_input_read()
/lvgl-latest/demos/ebike/generated/
Dfont_ebike_130.c2743 static lv_font_fmt_txt_glyph_cache_t cache; variable
2761 .cache = &cache
Dfont_ebike_56.c651 static lv_font_fmt_txt_glyph_cache_t cache; variable
669 .cache = &cache
/lvgl-latest/docs/details/main-components/
Dfs.rst108 drv.cache_size = my_cache_size; /* Cache size for reading in bytes. 0 to not cache. */
311 times than ``lv_fs_read`` is called. In the best case where the cache size is
315 The cache should be sufficiently large or disabled in that case. Another case where the cache shoul…
319 to other driver FS functions when the cache is enabled. i.e., ``lv_fs_read`` may call the driver's …
320 so the driver needs to implement more callbacks when the cache is enabled.
322 ``lv_fs_read`` :sub:`(behavior when cache is enabled)`
331 the cache is enabled"] --> B{{"is there cached data
333 B -->|yes| C{{"does the cache have
336 the cache to the destination
340 until the end of the cache
[all …]
Dimage.rst423 …tom post-processing function after ``lv_image_decoder_open`` to adjust the data in the image cache,
523 The size of cache (in bytes) can be defined with
527 The size of cache can be changed at run-time with
534 When you use more images than available cache size, LVGL can't cache all the
541 cache as long as possible.
544 the *weight* value in the cache entry in
548 Every cache entry has a *"life"* value. Every time an image is opened
549 through the cache, the *life* value of all entries is increased by their
554 If there is no more space in the cache, the entry with *usage_count == 0*
565 to cache even the largest images at the same time.
[all …]
/lvgl-latest/src/draw/
Dlv_image_decoder.c101 dsc->cache = img_cache_p; in lv_image_decoder_open()
160 if(lv_image_cache_is_enabled() && dsc->cache && dsc->cache_entry) { in lv_image_decoder_close()
162 lv_cache_release(dsc->cache, dsc->cache_entry, NULL); in lv_image_decoder_close()
398 lv_cache_t * cache = dsc->cache; in try_cache() local
404 lv_cache_entry_t * entry = lv_cache_acquire(cache, &search_key, NULL); in try_cache()
/lvgl-latest/docs/details/integration/renderers/
Dvg_lite.rst39 …buffer. When the GPU is busy, it will continue to fill the command buffer cache with rendering ins…
52 …:c:macro:`LV_VG_LITE_GRAD_CACHE_CNT` configuration to specify the number of gradient cache entries.
53 …Gradient drawing includes linear gradients and radial gradients. Using a cache can effectively red…
54 … many gradients used in the interface, you can try increasing the number of gradient cache entries.
55 …an try increasing the size of the GPU memory pool or reducing the number of gradient cache entries.
58 …eviously generated stroke parameters are automatically retrieved from the cache to improve renderi…
60 …you can try increasing the size of the GPU memory pool or reducing the number of stroke cache entr…
/lvgl-latest/.devcontainer/
D__c_cpp_properties.json__7 "/usr/local/emsdk/upstream/emscripten/cache/sysroot/include/"
/lvgl-latest/src/draw/sw/
Dlv_draw_sw_private.h48 uint8_t cache[LV_DRAW_SW_SHADOW_CACHE_SIZE * LV_DRAW_SW_SHADOW_CACHE_SIZE]; member
Dlv_draw_sw_box_shadow.c103 lv_draw_sw_shadow_cache_t * cache = &shadow_cache; in lv_draw_sw_box_shadow() local
104 if(cache->cache_size == corner_size && cache->cache_r == r_sh) { in lv_draw_sw_box_shadow()
108 lv_memcpy(sh_buf, cache->cache, corner_size * corner_size); in lv_draw_sw_box_shadow()
117 if((uint32_t)corner_size * corner_size < sizeof(cache->cache)) { in lv_draw_sw_box_shadow()
118 lv_memcpy(cache->cache, sh_buf, corner_size * corner_size); in lv_draw_sw_box_shadow()
119 cache->cache_size = corner_size; in lv_draw_sw_box_shadow()
120 cache->cache_r = r_sh; in lv_draw_sw_box_shadow()
/lvgl-latest/docs/details/libs/
Dtiny_ttf.rst32 By default, a font will cache data for upto 256 glyphs elements to speed up rendering.
36 available). The cache size is indicated in number of entries. Kerning is whether to allow

1234