Commit Graph

581 Commits

Author SHA1 Message Date
ChunEon Park de8362defe evas/common - code clean up for more readability. 2014-02-07 20:35:35 +09:00
ChunEon Park 4f905edca3 evas/common - code cleanup
useless to consider this optimization on these days
this just make people read code much awkward.

And actually the code have been unused.
2014-02-07 19:19:19 +09:00
Jean-Philippe Andre 4c4b44a575 Evas fitlers: Implement SLOW font draw to alpha targets
Well, raster did some great job at optimizing font draw... but only
to RGBA32 targets. In this font effects case, we also want to render
text on ALPHA buffers.

For now, reuse the existing alpha blending & glyph decompress
functions. It's MUCH easier, and works. Definitely slower than
decompressing on-the-fly and optimizing everything. But for now,
this will not even be the performance bottleneck in an effect
(blur will be a lot slower).
2014-02-07 17:33:17 +09:00
Jean-Philippe Andre 9adbbe0bd1 Evas fonts: Pass RGBA_Image instead of DATA32 buffer
Since we want to be able to draw to alpha buffers, it's
easier if we pass the whole image struct instead of just
the data pointer.
2014-02-07 15:38:43 +09:00
Jean-Philippe Andre 160d012559 Evas text utils: Check syntax in color parse
If the color string is not correct (ie. not #RRGGBBAA, #RGBA, #RGB, #RRGGBB),
return an error.
2014-02-07 15:38:42 +09:00
Jean-Philippe Andre 2928a2d2da Evas: Move _format_color_parse to common file
This (simple) code should be shared between Textblock and Filters.
2014-02-07 15:38:42 +09:00
Jean-Philippe Andre d8301fae6e Evas: Add support for Alpha buffers
Evas is an RGBA only engine, BUT we also use some alpha masks,
especially in the font rendering pipeline.
This commit adds basic support for alpha buffer operations
(blend and copy).

RGBA_Image can then point to either alpha-only data, if
its colorspace is grey.
2014-02-07 15:38:42 +09:00
ChunEon Park 5efa4f9305 evas/common - code refactoring.
tiny change for readibility.
2014-02-07 13:39:11 +09:00
Tom Hacohen 17d028f944 Evas font: Added support for font fallback for eet/edje fonts.
This is a long awaited feature that has been requested years ago.
Fontconfig finally added the support needed to make it happen, so here
it is.

I added a fontconfig query to look for similar fonts in case we loaded a
font from eet/edje/file(no fontconfig). This now works quite well.

Still missing: if you load a bold/italic/whatever font directly (set the file)
without putting ":weight=bold" you will not get run-time emboldenment if
only non-bold fonts are found.

This unfortunately depends on very recent fontconfig version (#ifed out
when unavailable), so only people with fontconfig >= 2.11 will enjoy
this feature.
2014-02-04 10:44:11 +00:00
Daniel Kolesa 871597f8c2 fix evas_tiler bug (makes evas get stuck in an infinite loop there in certain scenarios) 2014-01-29 10:00:29 +00:00
Jean-Philippe Andre cc8fa1da45 Evas: Fix MMX mask function _op_copy_p_mas_dp_mmx()
This function does the following operation:
COPY pixel x mask --> dst

But it wasn't iterating over the source. So it was repeating
the value of the first pixel over and over again.

Is this even used anywhere? RGBA + alpha mask function!?
2014-01-21 15:43:10 +09:00
Carsten Haitzler 1a9ebc02c0 _op_blend_c_dp_neon miscalculation fix
Summary:
When processing random data result of this function differs from C variant in more than 50% cases.
This difference is due to alpha calculation, in C code :

 a = 256 - (c >> 24)

in NEON:

"vmvn.u8  q7,q6       \n\t"
// ie (8 bit)~(c>>24)    ===   255 - (c>>24)

We cant just add "1" as overflow will occur in case (c>>24) ==  0  (we use only 8 bit per channel in vector registers)
So here is the solution:
copy *d right before multiplication and add it to the result of it later.

This makes the function slower by 20-30% but it is still at least 2 times faster then C code.

Reviewers: raster

Differential Revision: https://phab.enlightenment.org/D455
2014-01-21 08:50:34 +09:00
Carsten Haitzler 86a97efeea evas - fonts - move to using 4bit and rel 4 bit compressed font glyphs
this changes the internal encoding of font glyphs in evas to use 4bit
uncompressed if small, or 4bit rle (run length encoded) if larger.
this caves at least 50% of memory on fonts - and more if bigger. with
large fonts (40-80pixel size) we can save in the region of 80% of
memory used for glyphs. this also happesn to allow speedups in
rendering too.
2014-01-13 05:15:32 +09:00
Carsten Haitzler fc7fde97a2 evas - remove dead code (comment it out)
removes entirely dead code and keeps it for reference only
2014-01-10 18:48:42 +09:00
Carsten Haitzler f41bf26d7a evas - unbreak gl font rendering with dst pointer checks 2014-01-10 12:54:54 +09:00
Carsten Haitzler 03fccbd543 evas - sw render - protect against null pointer surface access 2014-01-10 12:47:27 +09:00
Carsten Haitzler 555df8f510 Revert "fix allocator sizeof operand mismatch reported by clang"
This reverts commit 955cc579d4.

why? wrong. no. and it breaks actual execution/functioning. segv land
2014-01-09 10:02:26 +09:00
Jihoon Kim 955cc579d4 fix allocator sizeof operand mismatch reported by clang
https://build.enlightenment.org/job/nightly_efl_clang_x86_64/lastSuccessfulBuild/artifact/scan-build/build/2014-01-07-1/report-QL6MiM.html#EndPath
https://build.enlightenment.org/job/nightly_efl_clang_x86_64/lastSuccessfulBuild/artifact/scan-build/build/2014-01-07-1/report-a2l0Ci.html#EndPath
https://build.enlightenment.org/job/nightly_efl_clang_x86_64/lastSuccessfulBuild/artifact/scan-build/build/2014-01-07-1/report-McvqNf.html#EndPath
2014-01-09 09:10:02 +09:00
Cedric BAIL a2d55c2b82 evas: fix build on windows. 2014-01-06 10:39:34 +09:00
Cedric Bail 8c094d1b2d evas: let's use HUGETLB when it makes sense. 2014-01-05 22:44:50 +09:00
Cedric BAIL 39a0ac4315 evas: disable use of mmap on windows for allocating pixels buffer.
We do have mmap provided by Evil, but there is no implementation yet of
an anonymous map support. Also it is not clear how the memory system of
windows does actually work, so not sure this optimization is relevant
to windows at all. Thus we disable it for the time being and unbreak
the windows support.

- cherry-pick me -
2014-01-03 17:53:51 +09:00
Carsten Haitzler 7753144fe9 evas - sw render - map render neon broken for expedite 45/46 disable 2014-01-01 12:56:18 +09:00
Nick Reed 1799ccfd9d evas - fix neon scale code
Summary: evas_scale_smooth would not compile with BUILD_NEON set

Reviewers: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D424
2014-01-01 11:22:40 +09:00
ChunEon Park f7aae1cf25 evas/common - removed white spaces and use eina bool instead of int. 2013-12-31 21:11:58 +09:00
ChunEon Park b4ea1aaa87 evas/common - refactoring code.
removed white spaces.
added some comments.
changed function and variable name to be more descriptive.
2013-12-31 18:32:30 +09:00
ChunEon Park 0d33d30acc evas/common - more elaborated compuatation in interpolation.
we should not +1 in divide but only do it when the quotient is zero.
2013-12-31 18:19:41 +09:00
ChunEon Park c37ad7dfea evas/common - removed white spaces 2013-12-31 13:29:57 +09:00
ChunEon Park 01c11211dc evas/common - fixed a comment typo. 2013-12-31 13:28:57 +09:00
Yury Usishchev 011fb2d10a Blending function rework and speedup
Summary:
_op_blend_mas_c_dp_neon rework:
main loop now process 4 pixels per iteration
fast path when *m == 0

Reviewers: raster

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D418
2013-12-29 13:29:28 +09:00
Daniel Juyung Seo 76d8532b54 efl: Unified eina critical manro to CRI.
Being annoyed by different types of eina critical macros - CRI, CRIT,
 CRITICAL -, I concluded to unify them to one. Discussed on IRC and
 finally, CRI was chosen to meet the consistency with other macros -
 ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
2013-12-26 12:27:13 +09:00
Cedric BAIL 1a5b7d383d evas: fix compilation issue on Jenkins windows that make me wonder how it does build on Linux. 2013-12-20 16:09:10 +09:00
Yury Usishchev 8fb948bd46 evas: patched evas_map_image.c to use NEON code
Reviewers: cedric, raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D397

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2013-12-20 15:10:09 +09:00
Carsten Haitzler ed27f52b05 evas - tiler - fix missing clip of first rect to outbuf size
stable release - cherry-pick me!
2013-12-18 20:38:15 +09:00
Carsten Haitzler 3a47fe5fa8 evas common - uninitialized use warning remove 2013-12-14 18:28:56 +09:00
Carsten Haitzler a99bc89331 evas - common - remove useless new as next call allocs if NULL 2013-12-13 21:26:05 +09:00
Carsten Haitzler 9c3682b746 evas - fix overdraw + too many rects problem found in some expedite tests
stable release - cherry-pick me!

there way a problem with software rendering - it rendered some areas
more than once per frame due to overlapping rectangles. it also had
more rectangles to cover the same update area that it should have had.
this fixes this.
2013-12-05 20:04:26 +09:00
Carsten Haitzler 48d3253b45 NEON vectorization: added use of COLSAME define in map routine
Reviewers: raster

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D341
2013-12-02 16:33:34 +09:00
Carsten Haitzler c12ac143c6 fix freetype header includes to be correct where ft 2.5.1 breaks builds
this should fix T591
2013-12-01 12:16:28 +09:00
Carsten Haitzler 38dd405712 evas - update extension/module loader list to match generic loaders list 2013-11-24 11:48:40 +09:00
Cedric Bail e551f88a09 evas: Let fix the mess in our header instead of sweeping it under the carpet.
This also does fix the build on Windows.

This reverts commit 86c08e6985.
2013-11-22 11:06:07 +09:00
Tom Hacohen 86c08e6985 Revert "evas: this headers order are seriously insane..."
Perhaps they are insane, but as the comments imply it defines
USE_HARFBUZZ which is needed afterwards. You just broke everything. I
know it's a mess there, but it's a mess that works. Your change doesn't.

This reverts commit d4b9e3b287.
2013-11-21 10:55:37 +00:00
Cedric Bail d4b9e3b287 evas: this headers order are seriously insane, hope that one fix the last breakage. 2013-11-21 18:26:29 +09:00
Cedric Bail 63c01cbb2a evas: reduce numbers of call to eet_init/eet_shutdown. 2013-11-21 10:50:48 +09:00
Carsten Haitzler deec62c9b6 evas - fix neon blend code used for text rendering to not leave dirty end 2013-11-15 19:17:01 +09:00
Carsten Haitzler 6c28aff7a0 evas - animated images. fix leak in not freeing the list of frames itself 2013-10-30 18:18:08 +09:00
Jean-Philippe Andre c8e6f9e5f9 evas/cserve2: Fix font reloading after cserve2 restart.
Well it LOOKS like it's working properly.
Clients can safely keep running after cserve2 crashed and
restarted.
2013-10-28 15:47:16 +09:00
Jean-Philippe Andre 6b6e33e262 evas/cserve2: Fix refcount for glyphs & glyph buffers
Maybe a little overkill on the iterations (ref/unref),
but at least we can really track down which glyphs are
currently being used.
2013-10-28 15:47:16 +09:00
Jean-Philippe Andre e74cac57e4 evas/cserve2: Reconnect to cserve2 in case of server crash
Try to reconnect to cserve2 if the socket connection was lost.
Resend some messages if necessary.

Images reload seems to be working.
Actually, the images don't change over time, so the clients just
keep the previous references to their images.

FONT RELOAD IS NOT WORKING:
- Crashes
- Invalid glyph data
- Infinite loop in _glyph_map_remap_check()

Root cause:
When new glyphs are requested from the server, they are added to
the mempool. So it is necessary to remap the font.
Unfortunately, in case of server reboot, we did not keep the mempool
so the old glyphs that were not requested again will not be valid.
2013-10-28 15:47:16 +09:00
Jean-Philippe Andre 9bb52372bd evas/cserve2: Fix animated Gifs support with cs2
cserve2 does not support animated Gifs, as the animated icon
logic doesn't match cserve2 logic.
Also, there is probably no need to cache these into shared
buffers anyways :)

Solution: fallback to normal cache (and delete current entry in
the client)
2013-10-28 15:47:15 +09:00
Jean-Philippe Andre 1e82480c9a evas/cserve2: Use scalecache with cserve2
Let's reuse the logic from scalecache and call cserve2
functions when the scalecache should be used.
So, now, cserve2 server will not scale any image... This is
too computationally intensive for the server's main thread.

This is not optimal but makes a hell of a lot more sense for
the moment. (since cserve2 manages the SHM segments)
2013-10-28 15:47:15 +09:00
Carsten Haitzler c4a45c75b1 evas gl engine related - fix elm image example 01 (T182).
this fixes https://phab.enlightenment.org/T182 as it is an issue with a
surface alloc overwriting an already allocated surface entirely inside
the general software image infra.
2013-10-26 21:09:17 +09:00
Cedric BAIL 15b9a640ac evas: fix CID 1102547 - Resource leak
If all rectangle are clipped out, it is perfectly possible to return
no rectangle, this would lead to a possible leak.
2013-10-14 13:37:50 +02:00
Jean Guyomarc'h dd2f6b1370 evas: fix build for Mac OS X.
Reviewers: cedric, michael.bouchaud

CC: cedric

Differential Revision: https://phab.enlightenment.org/D242

Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-10-14 12:10:19 +09:00
Cedric Bail 6dcffec491 evas: Use Eina_Spinlock for Evas_Scalecache, Evas_Async_Events and Image_Entry. 2013-10-11 11:08:17 +09:00
Tom Hacohen fca131d6fa Evas font: Added functions to query the underline properties.
This will let us query the position and thickness as requested by the font.
2013-10-02 11:46:25 +01:00
Carsten Haitzler 6a2aafeac3 evas - more deadlocks found. fixed. 2013-10-02 17:06:26 +09:00
Carsten Haitzler 48a3f299b0 evas - fix deadlock in preload that we seemm to never have hit before... 2013-10-02 16:32:33 +09:00
Carsten Haitzler 32514b7271 evas - clean up tiler code a lot and remove old commented out stuff 2013-10-01 20:57:39 +09:00
Vincent Torri 3b8b2ac66c evas: add JPEG 2000 loader.
This add finally support for JPEG 2000, but be aware that libopenjpeg
is very badly managed. There is currently only version 1.5.x that does
provide the right files, is usable by a third party and portable. You
can seriously forget any other version.
2013-10-01 16:38:44 +09:00
Cedric BAIL 5f630e8653 evas: let's inline data to get a little speedup when matching kerning. 2013-09-29 13:43:46 +02:00
Tom Hacohen 933998b93d Evas image: Moved a variable decl into the ifdef.
This variable is only ever used in the ifdef so there it should
reside.
2013-09-26 16:57:37 +01:00
Ulisses Furquim 063f076aed evas/async_render: remove block/unblock of render thread.
This reverts commit 42a46214c4.
2013-09-02 20:01:37 -03:00
Cedric Bail 54ef511197 evas: handle error case by properly deallocating memory. 2013-09-02 12:33:21 +09:00
Carsten Haitzler 42a46214c4 other async render issue - sync ALL rendering canvases, not just one 2013-08-29 21:18:04 +09:00
Cedric Bail 62a759de43 evas: define MAP_HUGETLB when it is not defined. 2013-08-29 09:54:34 +09:00
Cedric Bail ebdc7a9952 evas: use mmap/munmap on system that have it for image data. 2013-08-28 17:17:35 +09:00
Carsten Haitzler 175335ae08 evas - restore ability for evas_render_dump() to dump out referenced data 2013-08-28 16:44:31 +09:00
Tom Hacohen 041e3af3e5 Evas bidi: Fixed a bug causing BiDi not to work in some cases.
This issue cause non-letter RTL characters not to be detected as RTL
which in turn turned off bidi for those strings.
Example broken text: <RLM><LRO>[PAS<RLO>[--DES<PDF><PDF>.

Thanks to Yakov Goldberg for reporting this issue.
2013-08-27 14:11:16 +01:00
Yury Usischev bd6de4ba8c Add neon for upscaling and map routines in evas. 2013-08-02 18:06:55 +09:00
Carsten Haitzler f325a38632 evas sw map render - make more optimal (but compiler already did it)
as pointed out by y.usishchev@samsung.com - this code is copy & paste
badness, but the compiler optimizer fixed it up already, so it made no
difference in real life.
2013-07-19 18:32:57 +09:00
Carsten Haitzler 0d83feaa79 fix clang allocator size mistmatch (by casting - clang is wrong) 2013-07-16 19:24:44 +09:00
Chris Michael a9d0f3a919 Fix missing FTUNLOCK
Since we locked the font_draw mutex earlier, we should unlock it
before we return.

NB: Fixes Coverity CID1039382

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 14:15:41 +01:00
Chris Michael a231b7ed26 Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 14:15:24 +01:00
Chris Michael eabc1482f9 Fix memleak reported by Coverity.
NB: Fixes Coverity CID1039657

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 08:35:33 +01:00
Jean-Philippe Andre bb4e7fb869 evas: fix compilation warning in evas_font_draw.
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-07-02 16:58:10 +09:00
Jean-Philippe Andre 90d8647c02 evas/cserve2: fix crash with YUV tests in expedite.
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-07-02 16:58:10 +09:00
Chris Michael 694d1600e8 We should free glyph_out also (as that gets malloc'd too) on error.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-28 14:13:09 +01:00
Chris Michael dd136b82e2 Fix klockwork memleak: If we allocate space for a Font Glyph (through
evas_common_font_int_cache_glyph_get), then we should free that
allocation when we have an error.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-28 14:02:00 +01:00
Daniel Willmann f24dea2a90 evas_convert_colorspace: Remove printf in e_c_convert_yuv_422_601_to()
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-06-26 18:53:08 +01:00
Daniel Willmann 2df506feed evas_convert_colorspace: Be nice and actually return the converted data
Fixes a memory leaks in evas_common_convert_yuv_42* and actually makes
these functions more useful. It's a win-win.

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-06-26 18:53:08 +01:00
Jean-Philippe Andre 1f298139d8 evas: fix crash after font rehint 2013-06-24 14:52:54 +02:00
Sebastian Dransfeld 336f6ec328 efl: formatting 2013-06-20 13:28:18 +02:00
Sebastian Dransfeld 51023d2d4f evas: Keep sane name for public header
Evas_Common.h should be used for the public header, and rather rename
evas_common.h internal header to another name.

Sa:
Evas_Common_Header.h -> Evas_Common.h
evas_common.h -> evas_common_private.h

Shouldn't have both Evas_Common.h and evas_common.h because of case
insensitive filesystems.
2013-06-20 12:53:29 +02:00
Jean-Philippe Andre d2c3b67a72 cserve2: fix minor memleaks with fonts
Leaks happen when fonts fail to load
2013-06-20 17:42:07 +09:00
Carsten Haitzler 1914148446 evas: optimization - handle if c1 == c2 for map interplated lines 2013-06-14 21:32:56 +09:00
Carsten Haitzler ae2f824413 evas: fix possible seg with font glyphs from font instance in glyph array with no refcounting. 2013-06-14 19:57:18 +09:00
Tom Hacohen 3137e18962 Revert "continuation of ascent/descent fix by tom - make textblock work too."
This reverts commit 9473c4a9a5.

This commit is not correct. It just goes through every font in the
fontset, which is usually all the fonts in the system and tries to get
their ascent/descent and by that getting the max ascent/descent. This
won't work nicely.

The solution is to properly fix textblock, if you think there's
something lacking (I.e in the same way I did text).

However, my changes did not change previous behaviour, but were just
wrappers, so I don't see why extra changes would be needed. Please
elaborate.

I'm reverting this because:
1. I don't think it's correct.
2. It severly broke e in some cases (reference:
      http://www.enlightenment.org/ss/e-51b5d5e98cd387.04568822.png ).
2013-06-10 14:52:10 +01:00
Tom Hacohen d7db12f196 Revert "fix slowdown as a result of fixing text ascent/descent for fontsets from tom."
This reverts commit 9ecc87713d.
2013-06-10 14:51:38 +01:00
Daniel Willmann c1cba92f8b evas_font_load: Remove duplicate include of evas_font_ot.h
Because it defines USE_HARFBUZZ we need to include it before testing for
this define.

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-06-06 10:54:57 +01:00
Tom Hacohen 0d1ba652f0 Evas font: Fixed hb_font_destroy related warning.
Thanks to Daniel Willmann.
2013-06-06 10:42:06 +01:00
Jean-Philippe Andre 5836f503e1 evas/cserve2: fix crash in cserve2's font loading mechanism.
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-06-04 20:21:16 +09:00
Jean-Philippe Andre e973be52f9 evas/cserve2: fix memory leak when changing font hinting.
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-06-04 20:21:15 +09:00
Cedric Bail d1bed386bd evas: correctly detect if loader support asynchronous preloading.
This is an astonishing bug, I wonder since how long it has been there. It
is basically due to the use of void * and a wrong cast. Type checking is
clearly useful, let's use it more !
2013-06-04 11:22:13 +09:00
Carsten Haitzler 9ecc87713d fix slowdown as a result of fixing text ascent/descent for fontsets from tom. 2013-05-31 20:09:41 +09:00
Carsten Haitzler 9473c4a9a5 continuation of ascent/descent fix by tom - make textblock work too. 2013-05-31 19:08:35 +09:00
Tom Hacohen 311dab3fee Evas language: Handle signed wchar_t in a nicer way. 2013-05-16 09:56:17 +01:00
Carsten Haitzler b77016ad02 fix cedric's image property code... that broke load opt downscaling...
CEDRIC... it WAS YOU!... YOU BROKE ETHUMB!... i was.. RIGHT! :) well
done. your borking skills are pretty good. :) you broke load opt
downscaling for jpegs in general.. it just happened to turn up in
ethumb.
2013-05-13 08:19:02 +09:00
Tom Hacohen cc4cf77865 Evas font/text: Fixed an issue with asc/desc calculation in text object.
Added font_int asc/desc getters in order to achieve that.

Thanks to MinSu Seo for reporting.
2013-05-10 17:48:26 +01:00
Cedric Bail d833244100 evas: add infrastructure to open from Eina_File. 2013-05-08 18:17:00 +09:00
Cedric Bail c3f9d3b8b8 evas: Make Evas_Loader API public. 2013-05-08 18:16:59 +09:00
Carsten Haitzler 2a35811c9d fix seg on image del if loader is null. 2013-05-07 14:28:07 +09:00
Cedric Bail 0d2c6481b8 evas: final cleanup of the API, should be ready to make it public by now. 2013-05-06 19:02:05 +09:00
Cedric Bail 6929386895 evas: now move eina_file also out of the frame_duration API. 2013-05-06 19:02:05 +09:00
Cedric Bail 7d83e42046 evas: move evas cache API outside of the image data loader API. 2013-05-06 19:02:04 +09:00
Cedric Bail 6f802ab234 evas: start work on making the loader module a public API.
Goal is to be able to remove all internal Evas call from inside all
loader module. To do so we are going to open and hold a reference to the
file from outside of the module, read the header, create the image data,
load the data, close that reference.

Once that done, the next step is to let the file remain open as soon as
the filename/key is set and add an API to set an Eina_File directly. This
way edje can maintain the same file open as it use for an edje object,
keeping things in sync and avoid rendering glitch during update.
2013-05-06 19:02:04 +09:00
Cedric Bail c5b0d28d73 evas: move flags and attribute around. 2013-05-06 19:02:04 +09:00
Carsten Haitzler ab0fdf5916 it is possible with wchart_t to have it signed.. so unicode can be <
0... dont crash.
2013-04-30 23:11:01 +09:00
Tom Hacohen 9e96e8f122 Evas font: Fixed use-after-free. 2013-04-15 10:42:58 +01:00
Carsten Haitzler 7fd0cf1731 this is not a big change - not worth changelog, but allow gl partial
updates to be rounded up to specific tile sizes (and make it 16x16 by
default).
2013-04-11 21:24:06 +09:00
Cedric Bail 7df05ed287 evas: use a hash for the image scale cache. 2013-04-11 18:07:09 +09:00
Tom Hacohen 920c1b2af8 Evas font: Fixed a bug with cluster sizes and ligatures.
This casused cursor position (among other things) to look wrong with texts
ending with ligatures.

Thanks to Yakov Goldberg for reporting.
2013-04-08 13:31:09 +01:00
Jiyoun Park 810f1ca972 Evas font: fix font source have wrong current size. 2013-04-05 13:05:25 +09:00
Tom Hacohen 2da15ced65 Evas font: Disable run-time emboldment in some cases.
If OS/2 table is available and the font is demi-bold, don't do runtime
emboldment.
2013-04-04 16:05:42 +01:00
Yakov Goldberg d55c3f2bb7 evas/font: fix handling querying char at coords (click on gap)
If query at x coord, which points to rigth half of LTR char,
      next position will be returned. The same for left half of RTL char.

Signed-off-by: Yakov Goldberg <yakov.g@samsung.com>
2013-04-04 13:10:22 +03:00
Tom Hacohen 26a5cdc63b Evas language: Fixed compiler warning about unsigned comparison.
comparison of unsigned expression >= 0 is always true.

Thanks to vtorri for the report.
2013-03-12 11:17:17 +00:00
Carsten Haitzler b121520955 small improvement to pixman support - no need to create color image in
context unless font or rect or line or poly used.
2013-03-12 15:30:03 +09:00
Tom Hacohen 23264ae09c Evas textblock: Fixed coord (int) overflow.
X advance coords can be bigger than the limits of short.
2013-03-11 15:33:28 +00:00
Igor Murzov 7a794f8477 evas: Add WebP image saver 2013-03-09 14:11:35 +04:00
Tom Hacohen 5a55e5e56c Evas textblock: Added proper size adjustments for "high" shaped texts.
This adjusts the starting coords of the textblock to fit the shaped char of
the first line.
2013-02-28 16:26:09 +00:00
ChunEon Park 4e0b7d7bca evas/common - scale sample code optimization 2013-02-27 22:36:36 +09:00
ChunEon Park 8e3671eab7 evas/common - declare a var in function head. 2013-02-27 14:43:34 +09:00
ChunEon Park 53fa4cd2d8 evas/common - scale sample code refactoring. simpler and more effcient. 2013-02-23 21:45:10 +09:00
chuneon.park 1a0ee8cb87 evas/common - return function as soon as possible. 2013-02-22 22:42:48 +09:00
chuneon.park e79cb473a8 evas/common - fix indentation 2013-02-22 22:40:34 +09:00
Tom Hacohen 4fc694978b Evas font: Fixed font run detection for some cases.
There were issues for specific cases with 2 different fonts in the middle
of a run.
2013-02-21 15:00:57 +00:00
Tom Hacohen d6dababe78 Evas text: Fixed bug with the text object direction detection. 2013-02-21 13:39:37 +00:00
Ulisses Furquim 34cc6a1b15 evas/async_render: fix refcount handling of scaled image entries
SVN revision: 82961
2013-01-17 22:14:05 +00:00
Cedric BAIL 58291fb022 efl: let's use text_prop cache properly.
Now evas_object_textgrid_render account for 1% of the benchmark.


SVN revision: 82928
2013-01-17 10:28:18 +00:00
Cedric BAIL 6e9c28c147 efl: this function are used in evas canvas object.
SVN revision: 82917
2013-01-17 04:06:22 +00:00
Ulisses Furquim d8b2bce148 evas/async_render: fix scalecache integration
Note: scalecache is really crazy stuff, we should rewrite it or get rid of it.



SVN revision: 82912
2013-01-16 22:32:39 +00:00
Ulisses Furquim 09f342fdeb evas/async_render: use image scalecache
SVN revision: 82890
2013-01-16 16:07:46 +00:00
Carsten Haitzler b86a5cd30f fix pixman wrappers where image size and alloc size differ.
SVN revision: 82856
2013-01-16 06:32:34 +00:00
Cedric BAIL ffafb3602e efl: let's do less memcpy.
SVN revision: 82855
2013-01-16 06:31:32 +00:00
Paulo Alcantara b557bd9e0d efl/engines: Introduce multi_font_draw() function
This new engine function will only be used in software generic for
now - since it's the only engine used with the async render.

This function has been introduced in order to avoid growing thread
command queue too much to draw a text_props at a time on render calls
from textgrid objects.

Patch by: Paulo Alcantara <pcacjr@profusion.mobi>



SVN revision: 82832
2013-01-15 17:35:11 +00:00
Tom Hacohen c8e1fe4c9f Evas font: Add missing header.
SVN revision: 82826
2013-01-15 17:15:06 +00:00
Tom Hacohen c7dc78c98b Evas text props: Fixed bug with no-harfbuzz bidi.
SVN revision: 82814
2013-01-15 14:49:31 +00:00
Carsten Haitzler b2034671b7 as pointed out by avind - missing bidi dir changes.
SVN revision: 82710
2013-01-13 02:58:00 +00:00
Carsten Haitzler 440bb7c23c cut down textprop size a bit... 72 -> 64bytes. if we can wrap
tp->start/len/text_offset/text_len read/wrtie in access funcs. so we
can special case where:

1. start == text_offset == 0 && len == text_len == 1
2. start == text_offset == 0 && len == text_len < 65536
3. start == text_offset == 0 && len == text_len < 256
 


SVN revision: 82692
2013-01-12 08:40:46 +00:00
Ulisses Furquim 48c15aaa74 evas/async_render: only get a ref if a thread cmd was issued
This patch should make us get a reference on images, maps and glyphs
which are sent in a command to the render thread. Before we were doing
some useless ref and unref operations.



SVN revision: 82666
2013-01-11 19:57:09 +00:00
Ulisses Furquim f0f9f7b7a6 evas/text: remove misleading comments on glyphs array refs
SVN revision: 82665
2013-01-11 19:56:49 +00:00
Ulisses Furquim b9f05341c3 evas/async_render: skip early if text_props with no glyphs
This is intended to preserve old behavior now that we have
evas_common_font_draw_cb() to handle both sync and async callbacks.
However, we need to check where why we end up with no glyphs in a
text_props even after calling evas_common_font_draw_prepare().



SVN revision: 82664
2013-01-11 19:56:32 +00:00
Leandro Pereira a868276f11 evas: Try to reuse glyph array if possible
This sould bring back a little bit of text rendering performance, while at
the same time decreasing memory usage and fragmentation.

Patch by: Leandro Pereira <leandro@profusion.mobi>



SVN revision: 82660
2013-01-11 19:49:15 +00:00
Leandro Pereira 468b44c444 evas: Do not use an Eina_Lock for glyph array
Patch by: Leandro Pereira <leandro@profusion.mobi>



SVN revision: 82659
2013-01-11 19:48:28 +00:00
Paulo Alcantara 5eaba08284 efl/font: Avoid passing NULL glyphs arrays on unref
evas_common_font_glyphs_unref() *should* be called with valid glyphs
arrays.

Patch by: Paulo Alcantara <pcacjr@profusion.mobi>



SVN revision: 82658
2013-01-11 19:48:00 +00:00
Cedric BAIL 451abe47f5 efl: only compute font clip when relevant.
SVN revision: 82611
2013-01-11 05:21:54 +00:00
Cedric BAIL 4c64334b9d evas: remove duplicated piece of code.
SVN revision: 82601
2013-01-11 01:52:46 +00:00
Paulo Alcantara cf46337e17 efl/font: Dispatch font load request once sent to server
Patch by: Paulo Alcantara <pcacjr@profusion.mobi>


SVN revision: 82482
2013-01-09 21:37:34 +00:00
Ulisses Furquim d53f43abaf evas/common/thread_render: fix queue cache handling
Fixed queue cache handling to let enqueue and process happen at the same
time, even though this is not our use case yet. This also solves a race
with the assignment of cache variables outside the queue lock and
remembers to free the cache when shutting down.



SVN revision: 82296
2013-01-06 02:01:53 +00:00
Carsten Haitzler 7f1fb9b10d thanks joel.
SVN revision: 82254
2013-01-05 02:20:13 +00:00
Cedric BAIL 209347f148 efl: rename eina_inarray_add to eina_inarray_grow.
SVN revision: 81918
2012-12-31 01:27:58 +00:00
Cedric BAIL f8ea554926 efl: limit regression with async rendering.
NOTE: There is still an issue with text rendering, that
is still 4 times slower and impact all text object (text,
textblock and textgrid).


SVN revision: 81912
2012-12-30 23:39:11 +00:00
Carsten Haitzler ff3a370b9b font draw - dont alloc font props for 32 chrs.. if we are only ever
going to have less than 32.. eg textgrid. 1 per prop.



SVN revision: 81654
2012-12-23 11:02:50 +00:00
Carsten Haitzler 9e5266109d fix 24bpp rendering problem and pixel fetch problem found in qemu/kvm.
SVN revision: 81378
2012-12-19 15:40:52 +00:00
Stefan Schmidt 8d956c8e99 efl/evas_bidi: Fix memleak.
Make sure we also free udelmin when we retrun from from the for loop early.

SVN revision: 81334
2012-12-19 09:28:02 +00:00
Carsten Haitzler 076204d166 oops-- -> call c func not mmx funf .. in the c only render path!
SVN revision: 81315
2012-12-19 00:55:32 +00:00
Leandro Pereira 9b2b121e6f evas: Add thread threaded render queue
SVN revision: 81280
2012-12-18 16:21:03 +00:00
Leandro Pereira aa03e70141 evas/common: Prepare soil to land map code for threaded render
SVN revision: 81189
2012-12-17 21:30:07 +00:00
Leandro Pereira b4ceb3f2ba evas/common: Prepare soil to land scaling code for threaded render
SVN revision: 81188
2012-12-17 21:29:33 +00:00
Leandro Pereira 6ea2723322 evas/common: Prepare soil to land polygon drawing code for threaded render
SVN revision: 81187
2012-12-17 21:29:01 +00:00
Leandro Pereira b51ab5fc02 evas/common: Prepare soil to land rect drawing code for threaded render
SVN revision: 81186
2012-12-17 21:28:32 +00:00
Leandro Pereira 52104d26c8 evas/common: Prepare soil to land line drawing code for threaded render
SVN revision: 81185
2012-12-17 21:28:08 +00:00
Leandro Pereira bfe46f54ff evas: Do not unload pixels from RGBA_Image if cache refcount > 0
SVN revision: 81184
2012-12-17 21:27:40 +00:00
Leandro Pereira 274c9159c9 evas: Use refcounted glyph arrays
This is in preparation for threaded render landing: the render thread will
hold a reference to a text object's glyphs while it hasn't been rendered
yet (and will drop that reference after drawing). This changes the internal
API a little bit (evas_common_font_rgba_draw() now takes an Evas_Glyph_Array
instead of an Evas_Text_Props).


SVN revision: 81183
2012-12-17 21:27:07 +00:00
Leandro Pereira f96a5aac5c evas: Get rid of RGBA_Image ref member
(It's not by anything in the code.)



SVN revision: 81182
2012-12-17 21:26:15 +00:00
Stefan Schmidt 2dc790bf47 evas/bidi: Make sure we access the correct memory here.
Without that it would crash as we just freed it and assigned the realloc
code to tmp_ret.

SVN revision: 80863
2012-12-13 14:17:33 +00:00
Cedric BAIL 2ade3fa902 evas: fix case when we were in the middle of a charactere.
SVN revision: 80811
2012-12-13 10:36:00 +00:00
Gustavo Sverzut Barbieri a332d1c869 efl/evas: remove mask of non-rectangle objects.
it was broken and mostly disabled, so now we do remove it in the hope
who does that next time, does it properly.



SVN revision: 80252
2012-12-05 13:52:59 +00:00
Gustavo Sverzut Barbieri 545057d0b1 efl/evas/filters: say goodbye.
This task wasn't completed and it was all disabled in code, then
remove it so it doesn't add cruft to be looked at.



SVN revision: 80240
2012-12-05 13:03:51 +00:00
Cedric BAIL 014b5a1a29 evas: let fix all unref in the same way.
SVN revision: 80120
2012-12-04 01:54:22 +00:00
Paulo Alcantara cae8fd7ed4 evas/map: Refactor common code for map drawing
This patch refactors common code for map draws - so that it can be used
by other engines and *threaded* X11.

Signed-off-by: Paulo Alcantara <pcacjr@profusion.mobi>

Patch by: Paulo Alcantara <pcacjr@profusion.mobi>



SVN revision: 79855
2012-11-29 20:55:16 +00:00
Paulo Alcantara cf1360416e evas/line: Refactor common code for line drawing
This patch refactors common code for line draws - so that it can be used
by other engines and *threaded* X11.

Signed-off-by: Paulo Alcantara <pcacjr@profusion.mobi>

Patch by: Paulo Alcantara <pcacjr@profusion.mobi>



SVN revision: 79854
2012-11-29 20:48:24 +00:00
Paulo Alcantara a9bdfcca37 evas/font: Refactor common code for font drawing
This patch refactors common code for font draws - so that it can be used
by other engines and *threaded* X11.

Signed-off-by: Paulo Alcantara <pcacjr@profusion.mobi>

Patch by: Paulo Alcantara <pcacjr@profusion.mobi>



SVN revision: 79853
2012-11-29 20:47:12 +00:00
Cedric BAIL cbb6b39466 evas: only destroy font instance when we don't reference font anymore.
SVN revision: 79806
2012-11-29 05:36:56 +00:00
Cedric BAIL 06b9a559b4 efl: silent warning in evas_pipe.
SVN revision: 79805
2012-11-29 05:35:53 +00:00
Paulo Alcantara 6ae7344683 evas/image: Refactor common code for image drawing
This patch refactors common code for image draws - so that it can be used
by other engines and *threaded* X11.

Signed-off-by: Paulo Alcantara <pcacjr@profusion.mobi>

Patch by: Paulo Alcantara <pcacjr@profusion.mobi>



SVN revision: 79795
2012-11-28 22:49:19 +00:00
Paulo Alcantara 7dd926fbae evas/rectangle: Refactor common code for rectangle drawing
This patch refactors common code for rectangle draws - so that it can be
used by other engines and *threaded* X11.

Signed-off-by: Paulo Alcantara <pcacjr@profusion.mobi>

Patch by: Paulo Alcantara <pcacjr@profusion.mobi>



SVN revision: 79785
2012-11-28 19:17:00 +00:00
Paulo Alcantara f8f79f8599 evas/cserve2: Add scalecache support
Signed-off-by: Paulo Alcantara <pcacjr@profusion.mobi>

Patch by: Paulo Alcantara <pcacjr@profusion.mobi>



SVN revision: 79754
2012-11-27 18:23:25 +00:00
Carsten Haitzler a89d61079c fix evil textprop leak in textblock! :)
SVN revision: 79503
2012-11-21 09:12:42 +00:00
Carsten Haitzler 630d662a3b have ss3 etc. tests not be run (and thus fail) if env vars disable them.
SVN revision: 79231
2012-11-13 14:06:28 +00:00
Carsten Haitzler 0462ae7dda this is a new segv... get it with e17's language selector in wizard! :(
SVN revision: 79027
2012-11-09 15:02:39 +00:00
Vincent Torri c15e9c6575 merge: and now Evas
I've tested make -j 3 install and it works nicely

I've tested expedite with software and opengl xlib,
and it works. Not tested other engines, so please
report any problems (engines or other) on the ML.

TODO: examples and tests, I'll add them later

ISSUE: Eina_Unicode size check. It indirectly depends on
       eina_config.h, which is created at the end of the
       configure script. So its size is always 0. I don't
       know how that size is used, so I can't do a lot,
       for now.


SVN revision: 78895
2012-11-04 11:51:42 +00:00