Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/lib/canvas
Modified Files:
evas_object_text.c
Log Message:
optimize text object state change.. much better!
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_object_text.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- evas_object_text.c 16 Jul 2003 04:00:47 -0000 1.13
+++ evas_object_text.c 16 Jul 2003 05:12:46 -0000 1.14
@@ -486,6 +486,7 @@
{
Evas_Object_Text *o;
int is, was;
+ int same_font = 0;
if (!font) return;
if (size <= 0) return;
@@ -496,8 +497,9 @@
MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
return;
MAGIC_CHECK_END();
- if ((o->cur.font) && (font) && !strcmp(o->cur.font, font))
+ if ((o->cur.font) && (font) && (!strcmp(o->cur.font, font)))
{
+ same_font = 1;
if (size == o->cur.size) return;
}
was = evas_object_is_in_output_rect(obj,
@@ -530,7 +532,9 @@
if (o->cur.font) free(o->cur.font);
if (font) o->cur.font = strdup(font);
else o->cur.font = NULL;
- o->prev.font = NULL;
+ if (!same_font)
+ o->prev.font = NULL;
+
o->cur.size = size;
if ((o->engine_data) && (o->cur.text))
{
@@ -1284,7 +1288,14 @@
}
if (o->changed)
{
- updates = evas_object_render_pre_prev_cur_add(updates, obj);
+ if ((o->cur.size != o->prev.size) ||
+ ((o->cur.font) && (o->prev.font) && (strcmp(o->cur.font, o->prev.font))) ||
+ ((o->cur.font) && (!o->prev.font)) ||
+ ((!o->cur.font) && (o->prev.font)))
+ {
+ updates = evas_object_render_pre_prev_cur_add(updates, obj);
+ goto done;
+ }
}
done:
evas_object_render_pre_effect_updates(updates, obj, is_v, was_v);
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs