[E-devel] SDL engine and windows (cvs problem)
Hey Windows is case insensitive and in the SDL engine, 2 files have the same name (regardless of the case). May I rename evas_engine_sdl.h to evas_engine.h ? (and maybe evas_engine_sdl.c too, to be consistent) Vincent - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] SDL engine and windows (cvs problem)
On Mon, 16 Jul 2007 23:28:59 +0200 (CEST) Vincent Torri [EMAIL PROTECTED] babbled: Hey Windows is case insensitive and in the SDL engine, 2 files have the same name (regardless of the case). May I rename evas_engine_sdl.h to evas_engine.h ? (and maybe evas_engine_sdl.c too, to be consistent) sounds good to me. go for it. Vincent - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)[EMAIL PROTECTED] 裸好多 Tokyo, Japan (東京 日本) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] SDL Engine in windows?
Hello, I have a question regarding the resent SDL Engine updates. Would the engine allow evas on windows? I do not use windows but I do have to program apps for it and it would be really cool to use evas + edje and even have some portability. I know there maybe more issues getting evas etc to run on windows just wondering if it was a step closer. Thanks Frederick - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] SDL Engine
On Thu, 10 Aug 2006 18:46:27 +0200 Cedric BAIL [EMAIL PROTECTED] babbled: Hi, I started a SDL engine for evas and would like some feedback. First it's working and you will see something with evas_sdl_test. But I have already a few questions. ok- since you are using sdl native everything - you want to look at the xrender (and possibly gl) engines. these basically will be examples of exactly what you want to do in punting stuff off to the engines with surfaces, caches, etc. etc. :) I wanted to directly manipulate SDL_Surface inside RGBA_Image, but this means that for the destruction, I need to call SDL_FreeSurface or I didn't find a way to do that using the evas_common API. To handle this case, see above :) I implemented my own cache mechanism and copy/pasted all functions destroying some RGBA_Image. Well that is working, but that's definitely not clean. So I extract the cache mechanism and make it an evas API (separate patch in evas-data-cache.diff). But this didn't change the problem with evas_common function, like module loaders and others need to be copied. I really don't know how to handle this case correctly. Perhaps adding some callbacks for freeing and creating new image to evas_common_image_init() could be a solution to this duplication of code. Did you prefer a separate cache API, or should I put it back in the SDL engine ? Right now SDL cache is only handling one RGBA_Image with the same key/filename at a time. This means that if one RGBA_Image is dirty but still referenced, the new one will not be able to evict it. I could fix this by storing a list of RGBA_Image per key/filename, but right now the evas_sdl_test seems to be correct. Did I need to take care of this kind of issue or is it ok this way ? In the same idea, what are the purpose of engine_image_border_set, engine_image_border_get and engine_image_format_get ? They seem empty in all engine I am looking in. the xrender engine uses border_set. the format_get really isnt used - so returning NULL is fine here for now. Now if you tried the test program and hide the SDL output, you will notice that the part that didn't change stays black. To solve this, I need to handle SDL_ExposeEvent, but I don't really know where. As I understood most events are handle in ecore. But X11 backend for example, seems to be aware of this kind of issue. Did I need to check for SDL pending event every time evas_engine_sdl_output_flush is running ? Or did it exist a better way to do that ? thats just a matter of the test program doing it - look at the x11 ones - they actually just loop in a tight loop, poll the x event queue for expose events and add them to damage regions to the evas. Cedric -- - Codito, ergo sum - I code, therefore I am -- The Rasterman (Carsten Haitzler)[EMAIL PROTECTED] 裸好多 Tokyo, Japan (東京 日本) - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Re: [E-devel] SDL Engine
On Thursday 10 August 2006 23:48, [EMAIL PROTECTED] wrote: I'll let raster comment better on this.. but basically, when it comes to the image caching.. a general caching mechanism needs to be done yes -- one that can be used for any number of things. I had some some thoughts and code for this some while back and raster and I had discussed it a bit... but it's been sleeping for some time. Note though that the image caching mechanism has both a hash of 'active' images and a fallback list of 'inactive' images.. Here, that an object is 'active' means obj ref_count 0, and inactive means obj ref_count = 0. If an obj's ref count reaches 0, it gets removed from the hash of 'active' objs and placed at the head of the list 'inactive' ones. When looking for an obj, first the hash of active objs is tried, and if not found there, then the list of inactive objs is tried.. if an obj is found in the inactive list, it gets ref to 1, removed from the inactive list and added to the active hash... For my implementation, I have only a hash of object with ref_count. What setting the cache size does is to set a max on the memory used in the inactive list. Does your cache implentation follow this sort of pattern? Well it does have a mecanism doing something for memory usage and maximum number of objects in the cache. During insertion it test if this limit are ok. If the limit are reached, it made some attempt to evict old object from the cache (calling a callback each time). If he can't insert due to the limit, it could fail, but you can force the insertion if you absolutely want (In that case, it will just not enforce the limit. But I think I need to change the test, so that it still make some attempt to remove old object from the cache). In the same idea, what are the purpose of engine_image_border_set, engine_image_border_get and engine_image_format_get ? They seem empty in all engine I am looking in. The image 'border-set' is only used so far by the xrender engine, in order to fix some scaling issues of images with borders. This may have been a bad time to write a new engine.. ? There are many things that will change in the engine funcs -- this is needed in order to add various desirable api capabilities (eg. transforms and various vgfx related things). Well I now understand better the need for some change :) Cedric - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[E-devel] SDL Engine
Hi, I started a SDL engine for evas and would like some feedback. First it's working and you will see something with evas_sdl_test. But I have already a few questions. I wanted to directly manipulate SDL_Surface inside RGBA_Image, but this means that for the destruction, I need to call SDL_FreeSurface or I didn't find a way to do that using the evas_common API. To handle this case, I implemented my own cache mechanism and copy/pasted all functions destroying some RGBA_Image. Well that is working, but that's definitely not clean. So I extract the cache mechanism and make it an evas API (separate patch in evas-data-cache.diff). But this didn't change the problem with evas_common function, like module loaders and others need to be copied. I really don't know how to handle this case correctly. Perhaps adding some callbacks for freeing and creating new image to evas_common_image_init() could be a solution to this duplication of code. Did you prefer a separate cache API, or should I put it back in the SDL engine ? Right now SDL cache is only handling one RGBA_Image with the same key/filename at a time. This means that if one RGBA_Image is dirty but still referenced, the new one will not be able to evict it. I could fix this by storing a list of RGBA_Image per key/filename, but right now the evas_sdl_test seems to be correct. Did I need to take care of this kind of issue or is it ok this way ? In the same idea, what are the purpose of engine_image_border_set, engine_image_border_get and engine_image_format_get ? They seem empty in all engine I am looking in. Now if you tried the test program and hide the SDL output, you will notice that the part that didn't change stays black. To solve this, I need to handle SDL_ExposeEvent, but I don't really know where. As I understood most events are handle in ecore. But X11 backend for example, seems to be aware of this kind of issue. Did I need to check for SDL pending event every time evas_engine_sdl_output_flush is running ? Or did it exist a better way to do that ? Cedric diff -Nru -x CVS e17-main/libs/evas/src/lib/data/evas_cache.c e17-dev/libs/evas/src/lib/data/evas_cache.c --- e17-main/libs/evas/src/lib/data/evas_cache.c 1970-01-01 01:00:00.0 +0100 +++ e17-dev/libs/evas/src/lib/data/evas_cache.c 2006-08-08 18:58:28.0 +0200 @@ -0,0 +1,482 @@ +#include values.h +#include evas_common.h +#include evas_private.h + +#define EVAS_CACHE_MAGIC 0xDEADBEEF + +static int _evas_cache_empty_necessity (Evas_Cache* cache, int object_size, int force); +static void _evas_cache_remove_object (Evas_Cache* cache, int position); +static Evas_Cache_Object* _evas_cache_lookup (Evas_Cache* cache, const char* key); +static int _evas_cache_lookup_int (Evas_Cache* cache, const char* key); +static Evas_Data_Error _evas_cache_match_size (Evas_Cache* cache, int adding_size); +static Evas_Data_Error _evas_cache_match_count (Evas_Cache* cache); + +/** + * @defgroup Evas_Cache Memory pool manipulation functions for fixed size object + * + */ + +/** + * Build a new Evas_Cache object + * @param evict Function called when an object must be removed from the cache. + * @param max_objects_count Limit the maximum number of objects in the cache (0 means no limit). + * @param max_size Limit the size of the stored object in the cache (0 means no limit). + * @return A pointer to the new allocated cache object + * @ingroup Evas_Cache + */ +EAPI Evas_Cache* +evas_cache_init (void (*evict)(Evas_Cache* cache, const char* key, void* object, int reference), int max_objects_count, int max_size) +{ + Evas_Cache* new_cache = malloc (sizeof (struct _Evas_Cache)); + + if (new_cache) + { + new_cache-magic = EVAS_CACHE_MAGIC; + + new_cache-cache_content = NULL; + new_cache-objects = NULL; + new_cache-current_objects_limit = 0; + + new_cache-max_size = max_size; + new_cache-max_objects_count = max_objects_count; + + new_cache-current_size = 0; + new_cache-current_objects_count = 0; + + new_cache-evict = evict; + } + return new_cache; +} + +/** + * Destroy the cache and evict all the object stored in it + * @param cache The cache object to be destroyed + * @return EVAS_DATA_NONE if no error happen during the destruction or the error code corresponding to the encoutered error. + * @ingroup Evas_Cache + */ +EAPI Evas_Data_Error +evas_cache_shutdown (Evas_Cache* cache) +{ + Evas_Data_Error error = EVAS_DATA_NONE; + + if (!cache || cache-magic != EVAS_CACHE_MAGIC) + return EVAS_DATA_NULL; + + error = evas_cache_force_flush (cache); + if (error != EVAS_DATA_NONE) + return error; + + free (cache); + return EVAS_DATA_NONE; +} + +/** + * This function search inside the cache an object matching the key and increase the reference to it. + * @param cache The cache we refer to + * @param key The key pointing to the object we whant to get a reference to. + * @return A pointer to the increased
Re: [E-devel] SDL Engine
Cedric writes: Hi, I started a SDL engine for evas and would like some feedback. First it's working and you will see something with evas_sdl_test. But I have already a few questions. Well, I don't know anything about SDL, or how useful that might be, but it's certainly good work that you got as far as you did :) I'll let raster comment better on this.. but basically, when it comes to the image caching.. a general caching mechanism needs to be done yes -- one that can be used for any number of things. I had some some thoughts and code for this some while back and raster and I had discussed it a bit... but it's been sleeping for some time. Note though that the image caching mechanism has both a hash of 'active' images and a fallback list of 'inactive' images.. Here, that an object is 'active' means obj ref_count 0, and inactive means obj ref_count = 0. If an obj's ref count reaches 0, it gets removed from the hash of 'active' objs and placed at the head of the list 'inactive' ones. When looking for an obj, first the hash of active objs is tried, and if not found there, then the list of inactive objs is tried.. if an obj is found in the inactive list, it gets ref to 1, removed from the inactive list and added to the active hash... What setting the cache size does is to set a max on the memory used in the inactive list. Does your cache implentation follow this sort of pattern? In the same idea, what are the purpose of engine_image_border_set, engine_image_border_get and engine_image_format_get ? They seem empty in all engine I am looking in. The image 'border-set' is only used so far by the xrender engine, in order to fix some scaling issues of images with borders. This may have been a bad time to write a new engine.. ? There are many things that will change in the engine funcs -- this is needed in order to add various desirable api capabilities (eg. transforms and various vgfx related things). Maybe raster can give you more feedback :) jose. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel