Enlightenment CVS committal
Author : barbieri
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/lib
Modified Files:
Evas.h
Log Message:
Make layer number a short and Save 8 bytes.
By having a layer as a short (16 bits) we can pack it together with
the bitfields, saving 4 bytes per sub-struct, 8 bytes in total, also
bringing the struct down from 4 to 3 cachelines on my laptop.
Rationale: layers are mostly used to differentiate groups of objects
and they stacking, usually we have few layers and we use very large or
very small numbers to make a layer be at the top or at the bottom, but
usually we don't need so many layers.
Caution: code that use values like 999999 will break, so fix your
code! I'll provide another patch to fix all the CVS using these large
values.
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/Evas.h,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -3 -r1.120 -r1.121
--- Evas.h 30 Apr 2008 23:58:42 -0000 1.120
+++ Evas.h 1 May 2008 06:18:21 -0000 1.121
@@ -704,8 +704,8 @@
EAPI const char *evas_object_type_get (const Evas_Object
*obj);
- EAPI void evas_object_layer_set (Evas_Object *obj,
int l);
- EAPI int evas_object_layer_get (const Evas_Object
*obj);
+ EAPI void evas_object_layer_set (Evas_Object *obj,
short l);
+ EAPI short evas_object_layer_get (const Evas_Object
*obj);
EAPI void evas_object_raise (Evas_Object *obj);
EAPI void evas_object_lower (Evas_Object *obj);
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs