summaryrefslogtreecommitdiff
path: root/src/lib/evas/common
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-04-21 20:40:41 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-04-21 20:46:04 +0900
commit02d94f5e5e3eb973e7983a41993870d04d4d47c6 (patch)
tree8c4d74ac9aa71e5810e16db0b5d111813955dc4a /src/lib/evas/common
parent841403e41545a364447aca100c5d16db716fd994 (diff)
Evas tiler: Remove unused functions (clang)
rect_list_add_split_strict is still kept for reference in eina_tiler.c
Diffstat (limited to 'src/lib/evas/common')
-rw-r--r--src/lib/evas/common/evas_tiler.c85
1 files changed, 2 insertions, 83 deletions
diff --git a/src/lib/evas/common/evas_tiler.c b/src/lib/evas/common/evas_tiler.c
index d787ec2..2dbe9fd 100644
--- a/src/lib/evas/common/evas_tiler.c
+++ b/src/lib/evas/common/evas_tiler.c
@@ -2,8 +2,8 @@
2 2
3#define FUZZ 32 3#define FUZZ 32
4#define MAXREG 24 4#define MAXREG 24
5#define MAX_NODES 1024
5 6
6static inline void rect_list_node_pool_set_max(int max);
7static inline void rect_list_node_pool_flush(void); 7static inline void rect_list_node_pool_flush(void);
8static inline list_node_t *rect_list_node_pool_get(void); 8static inline list_node_t *rect_list_node_pool_get(void);
9static inline void rect_list_node_pool_put(list_node_t *node); 9static inline void rect_list_node_pool_put(list_node_t *node);
@@ -16,7 +16,6 @@ static inline list_node_t *rect_list_unlink_next(list_t *rects, list_node_t *par
16static inline void rect_list_del_next(list_t *rects, list_node_t *parent_node); 16static inline void rect_list_del_next(list_t *rects, list_node_t *parent_node);
17static inline void rect_list_clear(list_t *rects); 17static inline void rect_list_clear(list_t *rects);
18static inline void rect_list_del_split_strict(list_t *rects, const rect_t del_r); 18static inline void rect_list_del_split_strict(list_t *rects, const rect_t del_r);
19static inline void rect_list_add_split_strict(list_t *rects, list_node_t *node);
20static inline list_node_t *rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error); 19static inline list_node_t *rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error);
21static inline void rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error); 20static inline void rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error);
22static inline void rect_list_add_split_fuzzy_and_merge(list_t *rects, list_node_t *node, int split_accepted_error, int merge_accepted_error); 21static inline void rect_list_add_split_fuzzy_and_merge(list_t *rects, list_node_t *node, int split_accepted_error, int merge_accepted_error);
@@ -31,24 +30,7 @@ typedef struct list_node_pool
31 int max; 30 int max;
32} list_node_pool_t; 31} list_node_pool_t;
33 32
34static list_node_pool_t list_node_pool = { NULL, 0, 1024 }; 33static list_node_pool_t list_node_pool = { NULL, 0, MAX_NODES };
35
36static inline void
37rect_list_node_pool_set_max(int max)
38{
39 int diff;
40
41 diff = list_node_pool.len - max;
42 for (; diff > 0 && list_node_pool.node; diff--)
43 {
44 list_node_t *node = list_node_pool.node;
45 list_node_pool.node = node->next;
46 list_node_pool.len--;
47 free(node);
48 }
49
50 list_node_pool.max = max;
51}
52 34
53static inline void 35static inline void
54rect_list_node_pool_flush(void) 36rect_list_node_pool_flush(void)
@@ -321,69 +303,6 @@ rect_list_del_split_strict(list_t *rects, const rect_t del_r)
321} 303}
322 304
323static inline void 305static inline void
324rect_list_add_split_strict(list_t *rects, list_node_t *node)
325{
326 list_t dirty = list_zeroed;
327 list_t new_dirty = list_zeroed;
328 list_node_t *cur_node;
329
330 if (!rects->head)
331 {
332 rect_list_append_node(rects, node);
333 return;
334 }
335 rect_list_append_node(&dirty, node);
336 cur_node = rects->head;
337 while (dirty.head)
338 {
339 rect_t current;
340
341 if (!cur_node)
342 {
343 rect_list_concat(rects, &dirty);
344 break;
345 }
346 current = ((rect_node_t*)cur_node)->rect;
347 while (dirty.head)
348 {
349 int intra_width, intra_height;
350 rect_t r;
351
352 r = ((rect_node_t *)dirty.head)->rect;
353 _calc_intra_rect_area(r, current, &intra_width, &intra_height);
354 if ((intra_width == r.width) && (intra_height == r.height))
355 /* .-------.cur
356 * | .---.r|
357 * | | | |
358 * | `---' |
359 * `-------'
360 */
361 rect_list_del_next(&dirty, NULL);
362 else if ((intra_width <= 0) || (intra_height <= 0))
363 {
364 /* .---.cur .---.r
365 * | | | |
366 * `---+---.r `---+---.cur
367 * | | | |
368 * `---' `---'
369 */
370 list_node_t *tmp;
371 tmp = rect_list_unlink_next(&dirty, NULL);
372 rect_list_append_node(&new_dirty, tmp);
373 }
374 else
375 {
376 _split_strict(&new_dirty, current, r);
377 rect_list_del_next(&dirty, NULL);
378 }
379 }
380 dirty = new_dirty;
381 new_dirty = list_zeroed;
382 cur_node = cur_node->next;
383 }
384}
385
386static inline void
387_calc_intra_outer_rect_area(const rect_t a, const rect_t b, 306_calc_intra_outer_rect_area(const rect_t a, const rect_t b,
388 rect_t *intra, rect_t *outer) 307 rect_t *intra, rect_t *outer)
389{ 308{