evas xpm loader - remove the rgb txt file db loading and compile in

Desktop / Enlightenment / EFL Core Libraries - Carsten Haitzler (Rasterman) [rasterman.com] - 14 June 2017 04:04 EDT

so modern systems seem to have abandoned rgb.txt files. this leads to us breaking the loading of xpm files tha use color names ... i added the rgbt.txt from vim but that didn't seem to help... odd... so to just stop adding path after path to load... ship our own. we could ship the file... but then we'd still have to load and parse it... every time we look up a color. so i munged the data with awk and now we compile it in. it should consume the same space the rgb.txt does in the shared lib binary. if not read it shouldn't be paged in. it should end up cheaper than our floaing of the file and mmaping it when xpm module is loaded/initted... so either way more efficient, uses a little less ram (12306 bytes vs 17780 for the rgb.txt) ... and bonus - dont have an extenral out-of-code data blob to find, manage install etc...

this means we should load xpms with colornames correctly again on systems without an rgb.txt provided by x11 ... which seems to be the common case now. :(

@fix

4a9f28a evas xpm loader - remove the rgb txt file db loading and compile in
.../evas/image_loaders/xpm/evas_image_load_xpm.c | 1634 +++++++++++++++++++-
1 file changed, 1587 insertions(+), 47 deletions(-)

Upstream: git.enlightenment.org


  • Share