Enlightenment CVS committal
Author : barbieri
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/lib/include
Modified Files:
evas_private.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/include/evas_private.h,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -3 -r1.101 -r1.102
--- evas_private.h 1 May 2008 05:48:03 -0000 1.101
+++ evas_private.h 1 May 2008 06:18:21 -0000 1.102
@@ -361,7 +361,7 @@
{
Evas_Object_List _list_data;
- int layer;
+ short layer;
Evas_Object *objects;
Evas *evas;
@@ -416,8 +416,8 @@
struct {
unsigned char r, g, b, a;
} color;
- int layer;
Evas_Object *clipper;
+ short layer;
Evas_Bool visible : 1;
Evas_Bool have_clipees : 1;
Evas_Bool anti_alias : 1;
@@ -694,7 +694,7 @@
Evas_Layer *evas_layer_new(Evas *e);
void evas_layer_pre_free(Evas_Layer *lay);
void evas_layer_free(Evas_Layer *lay);
-Evas_Layer *evas_layer_find(Evas *e, int layer_num);
+Evas_Layer *evas_layer_find(Evas *e, short layer_num);
void evas_layer_add(Evas_Layer *lay);
void evas_layer_del(Evas_Layer *lay);
void evas_object_coords_recalc(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