summaryrefslogtreecommitdiff
path: root/src/lib/evas/common/evas_text_utils.h
diff options
context:
space:
mode:
authorLeandro Pereira <leandro@profusion.mobi>2012-12-17 21:27:07 +0000
committerLeandro Pereira <leandro@profusion.mobi>2012-12-17 21:27:07 +0000
commit274c9159c9da634f8957689e5e1b25ca4b588583 (patch)
tree36257b663705c38965be794dbfdfd770a465bcac /src/lib/evas/common/evas_text_utils.h
parentf96a5aac5ceb6d180a87aaadb1c3037786b26480 (diff)
evas: Use refcounted glyph arrays
This is in preparation for threaded render landing: the render thread will hold a reference to a text object's glyphs while it hasn't been rendered yet (and will drop that reference after drawing). This changes the internal API a little bit (evas_common_font_rgba_draw() now takes an Evas_Glyph_Array instead of an Evas_Text_Props). SVN revision: 81183
Diffstat (limited to 'src/lib/evas/common/evas_text_utils.h')
-rw-r--r--src/lib/evas/common/evas_text_utils.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/lib/evas/common/evas_text_utils.h b/src/lib/evas/common/evas_text_utils.h
index 3f615699f8..7ce2526834 100644
--- a/src/lib/evas/common/evas_text_utils.h
+++ b/src/lib/evas/common/evas_text_utils.h
@@ -19,6 +19,14 @@ typedef enum
19#define REPLACEMENT_CHAR 0xFFFD 19#define REPLACEMENT_CHAR 0xFFFD
20 20
21typedef struct _Evas_Glyph Evas_Glyph; 21typedef struct _Evas_Glyph Evas_Glyph;
22typedef struct _Evas_Glyph_Array Evas_Glyph_Array;
23
24struct _Evas_Glyph_Array
25{
26 Eina_Inarray *array;
27 unsigned int refcount;
28 Eina_Lock lock;
29};
22 30
23struct _Evas_Text_Props 31struct _Evas_Text_Props
24{ 32{
@@ -33,8 +41,7 @@ struct _Evas_Text_Props
33 Evas_Text_Props_Info *info; 41 Evas_Text_Props_Info *info;
34 void *font_instance; 42 void *font_instance;
35 43
36 Evas_Glyph *glyphs; 44 Evas_Glyph_Array *glyphs;
37 int glyphs_length;
38 45
39 int generation; 46 int generation;
40 Eina_Bool changed : 1; 47 Eina_Bool changed : 1;
@@ -62,6 +69,11 @@ struct _Evas_Font_Glyph_Info
62}; 69};
63 70
64void 71void
72evas_common_font_glyphs_ref(Evas_Glyph_Array *array);
73void
74evas_common_font_glyphs_unref(Evas_Glyph_Array *array);
75
76void
65evas_common_text_props_bidi_set(Evas_Text_Props *props, 77evas_common_text_props_bidi_set(Evas_Text_Props *props,
66 Evas_BiDi_Paragraph_Props *bidi_par_props, size_t start); 78 Evas_BiDi_Paragraph_Props *bidi_par_props, size_t start);
67 79