Commit Graph

2365 Commits

Author SHA1 Message Date
Tom Hacohen d9d3acc45a Evas vg: Fix Eolian warnings.
This includes either migrating types to eolian, fixing namespace or
importing extra types.
2016-02-16 09:45:47 +00:00
Tom Hacohen 7293d234e5 Efl vg: Use correct types in eolian file. 2016-02-16 09:35:22 +00:00
Youngbok Shin b85ae77633 Evas text: set NULL free'd pointers in evas_object_text_free()
Summary:
_render_pre() function could be called for an object which is
going to be deleted. According to state changes of the object,
text could be recalculated with free'd pointers. It caused an
invalid read and crash.
@fix

Test Plan:
1. Apply D1747.
2. Run elementary_test.
3. Put any character in elm_entry and change paragraph direction.
4. Put any character again.
5. It can cause a crash which is caused by invalid read in Evas Text.

Reviewers: herdsman, woohyun, tasn, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3445
2016-02-15 10:41:37 +00:00
Daniel Hirt d79a1ade6c Evas textblock: ifdef unused 'hyphens' code
The usage of the 'hyphens' array is only relevant when
"--enable-hyphen" is used.
This fixes the dead code addressed in
5b083ace84.
2016-02-14 15:46:23 +02:00
Daniel Hirt 196029316d Revert "Evas textblock: Properly ifdef hyphenation out."
This reverts commit 5b083ace84.

The "--enable-hyphen" option refers to using the optional hyphenation
dictionaries. We support hyphenation via SHY-HYPHEN hints regardless of
this option.
The following commit will provide finer handling to address the issue in
the reverted one.
2016-02-14 15:46:10 +02:00
Ivan Furs 5af22ba27a evas: optimize Canvas3D calculation of bounding space
Summary: Bounding box and sphere will calculate if user need callback of collision or data of box or data of sphere.

Reviewers: sri.hebbar, cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-02-12 21:25:55 +01:00
Tom Hacohen 4bfcc8a347 Eolian eina_types: Add Eina.Matrix3 and start using it. 2016-02-12 14:41:40 +00:00
Tom Hacohen 5b083ace84 Evas textblock: Properly ifdef hyphenation out.
I found this thanks to coverity. There was some code that we were running
although hyphenation was actually off.

CID 1341062.
2016-02-12 12:21:06 +00:00
Youngbok Shin 0186f87c49 Evas textblock: Fix _dict_hyphen_load could return an uninitialized pointer
Summary:
If there are hyph_*.dic files except for requested language,
"dict" pointer could be return without initialized. It doesn't make any
warning messages when it is compiled. Normally, it is NULL implicitly.
But, it is good to set NULL explicitly for understanding code.

Test Plan: N/A

Reviewers: herdsman, tasn, woohyun

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3674
2016-02-12 09:46:44 +00:00
Youngbok Shin b4f254e1a3 Evas font: Use proper enum value for extrabold
Summary:
ULTRABOLD is identical to EXTRABOLD in freetype.
But, "extrabold" word is added for FC_WEIGHT_EXTRABOLD.
So, it has to be changed to use EXTRABOLD instead of
ULTRABOLD. It was mistake in my previous commit.
@fix

Test Plan: N/A

Reviewers: tasn, herdsman, woohyun

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3673
2016-02-11 10:17:46 +00:00
Florent Revest 1d99c5b907 evas: include Eet.h where it's needed.
This patch is applied by OpenEmbedded project to let evas build
correctly in crosscompilation environnement.
cf: https://github.com/openembedded/meta-oe/blob/master/meta-efl/recipes-efl/efl/efl/0002-evas_3d-Add-Eet.h-includes.patch

@fix

Signed-off-by: Nicolas Aguirre <aguirre.nicolas@gmail.com>
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-02-10 10:46:45 -08:00
Mike Blumenkrantz da127a69d0 evas: check EINA_MEMPOOL env var when creating evas mempool allocators
this should really be a utility function already since all mempools in efl use
the exact same code...
2016-02-05 14:35:28 -05:00
Youngbok Shin 931b225895 Evas textblock: Save memory space reducing unused hyphen dictionary loads
Summary:
Commonly, only few hyphenation dictionaries are used at a application.
So, loading all of dictionary files could cause waste of memory.
Evas textblock has to load hyphenation dictionaries only when it is
really needed.

Test Plan: N/A

Reviewers: woohyun, tasn, herdsman

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3626
2016-02-04 17:30:58 +02:00
Youngbok Shin 33ea565347 Evas: Use proper language for harfbuzz shaping
Summary:
Evas Text, Textblock, Textgrid keeps own language information.
This language information could be vary from the result of setlocale().
Especially, Evas Textblock supports <lang> tag. The language could be
changed in the middle of text. All of these language has to be used
for harfbuzz shaping.
@fix

Test Plan: N/A

Reviewers: herdsman, raster, woohyun, tasn

Reviewed By: tasn

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3628
2016-02-04 10:07:08 +00:00
Youngbok Shin 757f842992 Evas textgrid: Use default language according to locale
Summary:
Use default language according to locale.
It's the same as the recent changes on Evas Text, Textblock.
@feature

Test Plan: N/A

Reviewers: herdsman, raster, tasn

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3642
2016-02-03 09:34:32 +00:00
Cedric BAIL bdd163fce8 evas: don't emit EVAS_CALLBACK_MOVE event if nobody is listening.
This give a constant improvement of 2% over a total benchmark run while scrolling
genlist. This benchmark included setup and destruction of the scene, so under
estimate the cost of the callback emit.
2016-02-02 10:47:25 -08:00
Cedric BAIL 1ec244a09e evas: no need to call legacy function internally when we can just dereference some pointers. 2016-02-02 10:47:25 -08:00
Cedric BAIL f1bf1e58df eo: return a value when adding or removing callback to help the caller manage state. 2016-02-02 10:47:25 -08:00
Cedric BAIL e8134e868a evas: make evas object an animator provider. 2016-02-02 10:47:01 -08:00
Cedric BAIL 62030c1003 evas: make evas a provider of animator. 2016-02-02 10:45:42 -08:00
Cedric BAIL bf26946ba1 evas: move canvas event to be declared inside proper eolian file. 2016-02-02 10:45:42 -08:00
Hermet Park 909af58b8e evas/canvas: fix an incorrect sizing of smart object bounding box.
height of the children b-box should be arranged by parent y-pos.

Signed-Off-By: KeuckDo Bang <keuckdo.bang@samsung.com>
Signed-Off-By: MinKyu Kim <imetjade.kim@samsung.com>

@fix
2016-02-02 21:19:46 +09:00
Hermet Park a382e92017 Revert "Revert "increase recalculation_cycle.""
This reverts commit 9efdf309ce.
2016-02-02 19:25:28 +09:00
Youngbok Shin cd01636d76 Evas textblock: Use a common thickness and position at a underline.
Summary:
If a underline is drawn with seperated thickness and position, it doesn't look good.
It will take the thickest and the lowest underline.

@feature

Test Plan:
Set the following markup text in Evas Textblock.
<underline=on underline_color=#fff><font_size=20>Markup text <font_size=50>with</font_size> underline tag</font_size></underline>

It shows the underline is split to 3 underlines with different thickness and positions.
Commonly, underline has to be drawn with same thickness ans position per each line.

Reviewers: woohyun, herdsman, tasn

Reviewed By: tasn

Subscribers: jpeg, raster, subodh6129, cedric

Differential Revision: https://phab.enlightenment.org/D2971
2016-02-02 10:22:09 +00:00
Youngbok Shin d15d91e0da Evas Text/Textblock: Use locale for lang as default.
Summary:
The configuration files for Fontconfig can describe
how font list is made according to language information.
EFL also set the language for each Evas textblock styles
and used for loading font list.

But, this is inconvenient to use if we want to apply language
for loading font list according to system-wide locale information.
This patch will apply locale information for font list if there is
no specific language in description.

And it also add [lang=auto] for Evas Textblock.
auto - It loads locale for language.
none - It disables language.

@feature

Test Plan: N/A

Reviewers: woohyun, herdsman, tasn

Subscribers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D3344
2016-02-02 10:22:09 +00:00
Hermet Park 9efdf309ce Revert "increase recalculation_cycle."
This reverts commit 524fd2f6fc.

rollback until release 1.17
2016-02-02 18:11:19 +09:00
Hermet Park f6722e63fa Revert "evas/canvas: simple optimization."
This reverts commit ca124ce5ce.

rollback until release 1.17
2016-02-02 18:09:01 +09:00
Hermet Park ca124ce5ce evas/canvas: simple optimization.
We don't need to reorder the clist here as far as I reviewed.
Because, the clist nodes will be calculated all in one.

If I'm wrong please ping me.
2016-02-02 17:59:27 +09:00
Hermet Park 524fd2f6fc increase recalculation_cycle.
256 is too short.
entry can be much larger than this calculation cycle.
2016-02-02 17:54:29 +09:00
Jean-Philippe Andre 2c61aa0d54 evas: Fix typo in previous clip issue fix
See 100a7006b8.

This typo actually caused some really rare crashes to happen
(even rarer than the one I fixed originally). Crashes nonetheless.
2016-02-01 20:29:15 +09:00
Jean-Philippe Andre 100a7006b8 Evas clip: Fix rare crash in _render_pre_clipper_change
Use delete callback instead of direct call to clip_unset,
which lets us know that clip_unset() is called during the
clipper's deletion, as opposed to a simple call.

We can then make sure that the previous object state does
not point to invalid data anymore.

Here is a scenario that could have crashed:
- load and show an edje object, hide it
- change its theme or style
- show it again

@fix
2016-01-28 12:19:53 +09:00
Chris Michael cbf2aa2bf9 evas: Fix explicit NULL dereference
This patch fixes an Coverity issue that if 'dst' gets set to NULL (as can
happen above) then this eo_do call may segfault as it is directly
accessing 'dst->buffer'.

@fix
CID1347415

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-27 12:07:38 -05:00
Chris Michael 64aff0a7f0 evas: Fix segfault when trying to determine overlay usage
Previously, _evas_render_can_use_overlay would segfault here when
trying to make use of an Evas_Video_Surface. This is because eo_tmp
variable was never reassigned to be the smart parent before we tried
to get eo data from it.

@fix

NB: Thanks Frenchie !! ;)

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-25 16:10:25 -05:00
Ji-Youn Park c11764534b evas: Updated documentation of evas_object_image_save. 2016-01-23 18:06:07 +08:30
Ji-Youn Park d395a867a4 evas: Updated documentation of evas_object_image_save. 2016-01-23 17:16:34 +08:30
Jean-Philippe Andre 26e74c4219 Evas filters: Fix transform filter (crashes & blend)
out was simply not initialized if the source and destination
were the same. The COW flag is required here to separate input
and output properly. Also, the source & destination pointers
were badly calculated and could overflow.

Instead of using memcpy this filter was supposed to use the
blend functions. This patch also fixes that.

In order to make this filter actually useful (think text reflection
on a flat surface), more information needs to be passed to the Lua
script, such as the text ascent, descent, etc...
2016-01-22 15:35:23 +09:00
Jean-Philippe Andre 1e35a5239b Evas filters: Fix inconsistency in transform API
This is a minor change, makes 'output' the default target for
the transform filter. This is consistent with all the other
filters. This is not exactly a bug fix but it doesn't break
compatibility with the earlier explicit form and improves the API
for 1.17.
2016-01-22 15:35:23 +09:00
Jean-Philippe Andre 139e27314c Evas filters: Disable debug mode!
Ooops, I must have let this in by mistake.
2016-01-22 15:35:23 +09:00
Jean-Philippe Andre c2522dd736 Evas filter: Rename constructor/destructor to ctor/dtor
This avoids a name clash with Eo.Base.
2016-01-13 18:51:20 +09:00
Jean-Philippe Andre 22324f21b3 EFL: Mark EOLIAN functions as static when possible
This affects mostly evas filters.
2016-01-13 15:34:20 +09:00
perepelits.m ba31dc7194 Evas: remove extra if from evas_3d_utils.h
Summary: remove extra if from evas_3d_utils.h according to Coverity (CID1339788)

Reviewers: raster, Hermet, cedric

Subscribers: jpeg, artem.popov

Differential Revision: https://phab.enlightenment.org/D3558
2016-01-13 14:50:59 +09:00
Jean-Philippe Andre 65715dafc5 Evas filters: Fix unused variables
Thanks @stefan_schmidt for the report
2016-01-13 14:50:58 +09:00
Jean-Philippe Andre 81ed0de016 Evas render: Fix typo (use & instead of &)
Thanks @stefan_schmidt for the report
2016-01-13 14:49:41 +09:00
Tom Hacohen 987fde58a7 Evas textblock: Remove redundant NULL check.
Detected by smatch.
2016-01-12 11:00:01 +00:00
Tom Hacohen e64192f446 Evas textblock: slight style fixes. 2016-01-12 10:55:49 +00:00
perepelits.m 687df102d6 evas: fix optimization of vertex count in convex hull
Summary: FLT_COMPARISON should be used everywhere in evas_3d_utils.h

Reviewers: cedric, raster, Hermet

Subscribers: jpeg, artem.popov

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-09 00:33:51 +01:00
Jean-Philippe Andre 25ccef095e Evas filters: Fix minor compilation warning 2016-01-07 19:19:09 +09:00
Jean-Philippe Andre 52dfd61833 Evas filters: Fix async render and unify SW + GL
SW async render mode was broken because it was party sync, partly
async (bad hack in a recent commit). This patch fixes that by
using a proper callback for render_post (main loop).

Since the engines and ector now abstract all pixel access functions,
the only difference between GL and SW is the async rendering.
2016-01-07 17:47:48 +09:00
Jean-Philippe Andre 1f291a6a5b Evas filters: Run immediately in async mode (flush vs. enqueue) 2016-01-07 17:47:48 +09:00
Jean-Philippe Andre c4b25604c7 Evas: Document Evas.Render_Op
1. MASK is not used for masking
2. only BLEND and COPY actually work

Should we merge Efl.Gfx.Render_Op and Evas.Render_Op?
(this would mean Efl.Gfx.Render_Op.copy = 2 instead of 1)
2016-01-07 15:12:34 +09:00
Jean-Philippe Andre 8822dcd115 Evas filters: Remove ERR message
GL filters now work. Slow, but they work.
2016-01-07 14:46:22 +09:00
Jean-Philippe Andre e61182f7ac Evas render: Fix render artifacts with a mapped object
Problem visible in Enventor "map" example, with the SW engine.

Fixes T2979
2016-01-07 11:12:51 +09:00
Jean-Philippe Andre f00f466250 Evas render: Distinguish has_map and can_map
This patch is a minor code cleanup before fixing T2979
(render artifacts inside Enventor).
2016-01-07 11:12:51 +09:00
Minwoo, Lee 3f5066278e evas: fix a NULL dereference issue
Summary:
If evas engine init failed, it can make crash.
For example
If opengl init failed, then ee->prop.window is 0
ecore_evas_gl_x11_options_new_internal
{
   if (!ee->prop.window)
     {
        ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver);
        ecore_evas_free(ee);
        return NULL;
     }
}

ecore_evas_free calls evas_fonts_zero_pressure
and this time evas->engine.func is NULL so it makes crash.

Reviewers: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-06 13:36:40 -08:00
perepelits.m d2bb0eefc4 Evas 3d: Get hash table of scenes using the given node as root.
Summary: We need this to have an access to scene while running programs in edje-3d.

Reviewers: cedric, raster, Hermet, jpeg

Reviewed By: jpeg

Subscribers: jpeg, artem.popov

Differential Revision: https://phab.enlightenment.org/D3529
2016-01-06 13:50:21 +09:00
Jean-Philippe Andre c1b4728487 Evas filters: Final fix after the ector refactor
This implements a generic way of scaling buffers, using fake
RGBA_Image wrapping ector buffer maps. The underlying algo is
still the good old linear sw scaler.

Now the filters *should* be back to their previous level of
usability. Performance will probably be even worse than it was
before, for GL, as more glReadPixels may be involved. Optimization
now consists in actually implementing the filters with GL shaders.
2016-01-05 16:02:27 +09:00
Jean-Philippe Andre 0d5b42e6bb Evas filters: Move evas image creation to the engine
Evas filters is now more and more unaware of evas images (RGBA_Image)
and the engine + ector take care of everything.

Still left to do:
- map / unmap an FBO buffer into RO or RW memory
2016-01-05 15:43:44 +09:00
Jean-Philippe Andre 9e0670a705 Evas filters & Ector GL: Prepare ground work for GL buffers
This fixes crashes, adds safety, and notes a couple of things that
are not yet implemented:
- Make an Evas_GL_Image from an RGBA_Image so we can draw it on the
  canvas. This means Evas.Ector.GL.RGBA_Image.Buffer
- Readable Evas_GL_Image objects with gl_read_pixels
  --> Implement proper map() & unmap() for GL buffers
2016-01-05 15:43:44 +09:00
Jean-Philippe Andre eda13b7298 Evas filters: Relax limitations about colorspaces
Since Ector Buffer implicitly converts colorspaces, we
can allow more commands to work even if they are suboptimal.

Now all filters should support any combinaison of input, map/mask
and output colorspaces.
2016-01-05 15:43:44 +09:00
Jean-Philippe Andre 7d636630cf Evas filters: Fix proxies following previous refactor
FIXME:
 - GL support is still shaky
2016-01-05 15:43:44 +09:00
Jean-Philippe Andre 57902fffd3 Evas filters: Use Ector.Buffer instead of RGBA_Image
This is a major refactoring of the evas filters submodule.

Use Ector.Buffer and the map/unmap methods instead of directly
accessing image buffers with RGBA_Image. RGBA_Image is still
used under the hood, for two reasons:
 - Required for the final output (blend onto Evas itself)
 - Required for the scaling routines

FIXME:
 - Breaks proxy support (ie. all kind of texturing).
 - This breaks filters support for the GL engine.
2016-01-05 15:43:44 +09:00
Jean-Philippe Andre e3af2783ff Evas filters: Minor debug improvement 2016-01-05 15:43:44 +09:00
Jean-Philippe Andre 9bd36f7c43 ector eo: fix indentation (tabs --> spaces)
Why? Why would an editor replace 8 spaces by a TAB?
WHYYYYYY?
2016-01-05 15:43:43 +09:00
Jean-Philippe Andre 7a8879ba8b ector: add engine-specific evas image buffer wrapper
Since Evas still relies entirely on Image_Entry and Evas_GL_Image,
we will need an engine-specific wrapper object creating a Buffer
around an existing cached image.

Currently only SW support is implemented. GL will be more fun to
do (with glReadPixels and whatnot).
2016-01-05 15:43:43 +09:00
Jean-Philippe Andre 61fcf8e497 Evas filters: Fix crazy code (only when DEBUG=1) 2016-01-05 14:54:04 +09:00
se.osadchy 2127547cb9 evas: create Eina_Vector2 structure and add functions.
Summary: Only copy code from evas_3d_utils, rename evas to eina and add documentation.

Reviewers: Hermet, raster, jpeg, cedric

Reviewed By: jpeg, cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:06:00 -08:00
perepelits.m e6ccfcedd8 evas: fix convex hull.
Summary:
There were some problems with second and third vertices in the first triangle of convex hull. It is very hard to see this errors because it could cause
an excess of triangles inside of convex hull, I have used blender to find them.

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

Subscribers: jpeg, artem.popov

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 14:50:45 -08:00
Tom Hacohen ebe09c4854 Evas textblock: Clean up ellipsis handling code.
This cleans up the previous commit a bit by isolating the calculation
code and using a temporary descriptively named variable for the calculation.
2016-01-04 15:12:10 +00:00
Youngbok Shin 3252e3bf78 Evas Textblock: Fix ellipsis when textblock is resized to formatted h.
Summary:
it->h is sum of max ascent and max descent. It shouldn't be used
when handle ellipsis. Because, Evas Textblock uses these values for
each lines differently according to its location.
(start, end, else, single)
So, for handling ellipsis exactly, it has to be fixed.

Test Plan: A test case is included in Evas Test suite.

Reviewers: woohyun, tasn, herdsman

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3475
2016-01-04 15:12:10 +00:00
Jean-Philippe Andre 2ac9e788c6 Evas: Implement ARGY88 and GRY8 conversion to ARGB8888
This is adding support for a deprecated function, but apparently
it is used.

Also, remove crazy abort() inside the data_put function.

Fixes T2991
2015-12-29 22:05:50 +09:00
Jean-Philippe Andre b13502f20a Evas 3d: Fix some potential crashes
Those were happening before the previous patches.
2015-12-29 16:18:36 +09:00
Jean-Philippe Andre 92f17399a7 Evas 3d: Improve error messages in model load & save
See make check's evas_suite ouput
2015-12-29 16:08:05 +09:00
perepelits.m e6bba4d91c [Evas] Refactor model's savers and loaders.
Summary:
Move common part to a separated document.
Make code more readable using smaller functions. (from Task T2713)

Everything is OK with make check.

Reviewers: cedric, raster, Hermet, stefan_schmidt

Reviewed By: stefan_schmidt

Subscribers: jpeg, artem.popov

Differential Revision: https://phab.enlightenment.org/D3430
2015-12-29 13:28:56 +09:00
Mike Blumenkrantz 8981f08555 evas: handle existing pointer grabs when changing object pointer mode
in the case that pointer mode is changed on an object at any time after
a grab has been acquired by the object, grabs/flags must be adjusted for
this and other "pointer-in" objects in order to avoid permanently
breaking canvas events

@fix
2015-12-22 16:21:11 -05:00
Mike Blumenkrantz e4d11e2e4f evas: unset pointer ungrabs when using EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN
I have no idea what this mode was intended to do since there are no docs
and the related code in evas events is undocumented, so I can only speculate.

what I can say for certain is that this mode does grab, in opposition to its name,
and that until this commit any object which sets this pointer mode will
permanently break mouse eventing on the canvas

ref evas SVN 67264

@fix
2015-12-22 16:21:11 -05:00
Subodh Kumar 105960b24f Evas textblock: Fix some indentation and formatting.
Summary: Fix some indentation and formatting.

Reviewers: herdsman, cedric, tasn

Reviewed By: cedric

Subscribers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D3174
2015-12-18 15:14:05 +00:00
Minkyoung Kim 25ebd91555 evas/gl : Do not re-preload image data if texture is successfully uploaded with image data.
Summary:
'cached' flag is not enough to check whethere data is loaded and texture is uploaded.
so check more options for prevent re-preload image data on gl-backend.

Test Plan: Local Test (elementary_test : elm images)

Reviewers: jpeg, eunue

Reviewed By: jpeg

Subscribers: cedric, jiin.moon, wonsik, spacegrapher

Differential Revision: https://phab.enlightenment.org/D3446
2015-12-18 16:49:17 +09:00
Tom Hacohen 3d91e5eae8 Revert "evas: fix some indentation and formatting in textblock."
This patch was *REJECTED*. I don't understand why it was snuck in among
a batch of 24 other unrelated patches. That made me miss it originally,
  but found it now. This is wrong and shouldn't be in.

This reverts commit 3f0d0daf0d.
2015-12-17 12:51:37 +00:00
Subodh Kumar 43f50dc7db Evas textblock: Use width of item format to position cursor.
Summary:
Use width of item format to position cursor.

Sometimes it becomes very difficult to
position cursor over item and selection
becomes very difficult as we position the
cursor once the input X coord reached end of the item,
like one attached in the test plan. So this patch
decides over 50% of item width for X coord reaches
to position it at start or end.

@ix

Test Plan:
Attached setup shows how difficult to position cursor at the end when clicked
over item and selection is also very difficult. Consider such case in mobile
device, its becomes impossible to position cursor at the end and selection is
too much difficult.

{F27036}

Also added test cases in evas test suite

Reviewers: herdsman, tasn

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3390
2015-12-17 12:00:23 +00:00
Sung-Taek Hong 8c891ed049 evas_callback: Remove callbacks in reverse order with evas_event_callback_del
Summary:
 - This function is deprecated, because del_full should be used instead.
 - Still, the documentation specifies in which order the callbacks should
 - be deleted.

Reviewers: Hermet, jpeg, jaehwan

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3459
2015-12-17 16:03:26 +09:00
Mike Blumenkrantz fc4b927a83 evas: update/clarify RENDER_FLUSH callback docs 2015-12-15 17:57:37 -05:00
Mike Blumenkrantz fb8c547077 evas: do not unset/delete master clip after every frame
this is not ideal since it triggers a client-side rerender of every object
which was clipped to the master clip (double render) and then this ends up
forcing the server to rerender the same area twice as well

not only that, it causes all surface damages to to be the size of the entire
window - framespace for every frame

@fix
2015-12-15 17:24:52 -05:00
Mike Blumenkrantz 1d3c4162b3 evas: trigger FLUSH_PRE callback prior to kicking off an async render
while not occurring immediately before flush as in sync rendering, this
is functionally close enough that it will serve the purpose for which the
callback was intended, namely receiving a callback that occurs after render
update calculations have occurred but before flush happens

@fix

ref cbb447c878
2015-12-15 17:24:52 -05:00
Mike Blumenkrantz 092d7a6f3d evas: resize master clip if framespace|viewport.changed is set 2015-12-15 17:24:52 -05:00
Mike Blumenkrantz 990c23c840 evas: do not add unclipped smart members to the master clip
this is probably a pretty unlikely scenario, but messing with smart
members in this way is probably not a great idea

@fix
2015-12-15 17:24:52 -05:00
Jean-Philippe Andre 42744eff6f Evas VG: Fix clang warning 2015-12-15 15:05:03 +09:00
Youngbok Shin fcba96384f Evas Textblock: Fix NULL dereferencing issue
Summary:
Even if the given two cursor is NULL, it shouldn't be crashed.
@fix

Test Plan:
Test case included in Evas test suite.
Run "make check".

Reviewers: herdsman, tasn

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3422
2015-12-13 17:15:10 +02:00
Carsten Haitzler 22869bb94e evas - fix evas module locks to init/del when movile created/destroyed
we initted when we load and unload. this led to races with
locking/unlocking elsewhere as these expected us to be initted and we
were not yet. this fixes that!

@fix
2015-12-12 23:37:16 +09:00
Carsten Haitzler 000beb2f17 Revert "evas: trigger RENDER_FLUSH callbacks during async render"
This reverts commit cbb447c878.

1. this is wrong because evas_render_pipe_wakeup() is being called IN
THE RENDER THREAD. it... SENDS a wakeup back to the mainloop with

   evas_async_events_put(data, 0, NULL, evas_render_async_wakeup);

and you can see that evas_render_async_wakeup() calls
evas_render_wakeup() and in evas_render_wakeup() flush pre/post are
called, but since the trhead does the flush we cant realyl call
before/after, but it retains order... IF there are updates (haveup).

so calling these callbacks FROM a thread is now leading to apps
mysteriously exiting. this is mucho bad. just at random i now have my
terminals exiting.
2015-12-11 15:15:36 +09:00
Minkyoung Kim a9df72f611 evas: Do not preload data if data is cached.
Summary: Summary : If data is cached, need not to reload data.

Test Plan: Local tests

Reviewers: jpeg

Reviewed By: jpeg

Subscribers: eunue, spacegrapher, cedric, wonsik, jiin.moon

Differential Revision: https://phab.enlightenment.org/D3418
2015-12-11 14:05:12 +09:00
Mike Blumenkrantz cbb447c878 evas: trigger RENDER_FLUSH callbacks during async render
these callbacks are used, so ensure that they get called in the expected
order

@fix

 #PatchesFromCedric
2015-12-10 16:00:45 -05:00
Jean-Philippe Andre 4bcd2fa0f0 Revert "Evas: Refactor model's savers and loaders."
This reverts commit 01a32f64c0.

This broke make check with the following error:
evas_test_mesh.c:123:F:Meshes:evas_object_mesh_loader_saver:0: Failure 'res == 1' occurred

Reopen https://phab.enlightenment.org/D3420
2015-12-10 18:21:09 +09:00
perepelits.m 01a32f64c0 Evas: Refactor model's savers and loaders.
Summary:
Move common part to a separated document.
Make code more readable using smaller functions. (from Task T2713)

I did it again because somehow test is passing now. It seems like this test suite is unstable.
Please, let me know if there are any errors after running distcheck.

Reviewers: cedric, raster, Hermet, stefan_schmidt

Subscribers: jpeg, artem.popov

Differential Revision: https://phab.enlightenment.org/D3420
2015-12-10 16:50:06 +09:00
Pankaj Mittal 1363cd757a evas_eet: Add Type Safety check
Summary:
The Function _evas_canvas3d_eet_file_free(void) is referenced in  evas_model_load_file_eet()(file:evas_model_load_eet.c at line 122).
This call is  under condition
        if ((eet_file->mesh == NULL) || (eet_file->header == NULL)).
when  either eet_file->mesh or eet_file->header are NULL, dereference of the corresponding pointer in function "_evas_canvas3d_eet_file_free()"
will generate Segmentation Fault.

@fix

Reviewers: raster, Hermet, tasn, wonsik, spacegrapher, cedric, jpeg

Subscribers: singh.amitesh, sachin.dev, alok25, yashu21985, mvsovani, cedric

Differential Revision: https://phab.enlightenment.org/D3369
2015-12-10 16:26:56 +09:00
Youngbok Shin 20ef85e307 Evas text: Fix Evas Text truncated text case.
Summary:
Evas Text only concerns about a advance of each text item.
When a width of last character is bigger than its advance, the last character can be truncated.
And the different line size calculation caused different aligning between Evas Text and Evas Textblock.
So, the width of last character will be considered in Evas Text just like Evas Textblock.
@fix

Test Plan:
The following text shows how the size calculation is different between Evas Textblock and Text.
Get native size from Evas Textblock and get width(geometry) of Evas Text.
You can see the width of Evas Text is bigger than native size of Evas Textblock.
(adv > width)
こんにちは。

The following text will be truncated without this patch.
(adv < width)
ନୂଁ

Reviewers: woohyun, tasn, herdsman

Subscribers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D3004
2015-12-09 11:10:46 +02:00
Jean-Philippe Andre 31984449a5 Evas filters: Move 'fill' to its own file 2015-12-09 11:45:34 +09:00
Stefan Schmidt 96a9d75e0c Revert "evas: refactor model's savers and loaders."
This reverts commit 32c33ed64d.

This refactor broke the evas test cases for the model loaders and savers. I gave
it a week to get fixed but a first try did not succeed and its blocks a lot of
other automated testing. To be honest, it should have never gone it when it
breaks existing test cases. Once fixed this refactor can happily go in.

Fixes T2905
2015-12-08 22:33:05 +01:00
Daniel Hirt 7e8e392db6 Evas textblock: improve and fix line range rectangles
The line range rectangles geometries needed a bit of adjusting. I
started out with fixing T2648. In order to fill the gap between the end
of the line and the margins, the geometry of the last line's character
was used. I am not really sure why. Anyway, we have the line geometry,
so I replaced it with that.

Then, it led me to do some alignment checks, and indeed alignment cases
were not treated. For instance, an LTR paragraph could have a line
aligned with a value greater than 0.0. That means that we should fill
the gap from the left of the line, if it was the last line in a
multi-line selection. The inverse case is for RTL.

I think it now works as it should. Will see if the selection logic is
missing some more stuff once I come up with more example cases.

Fixes T2648.

@fix
2015-12-08 17:19:18 +02:00
Tom Hacohen 3896c03cff Evas render2: Fix always false comparisons.
This looks like a classic copy and paste error. It didn't make any sense
before, and it seems like no one was going to take a look at it.
This looks correct. If this breaks something (is render2 even used),
someone should remove those lines. I wasn't entirely sure if I should
just remove them, or correct them, as some of the code looked redundant
anyway.
2015-12-08 11:35:25 +00:00
Jean-Philippe Andre 15d5125d6e Evas filters: Remove unused variable 2015-12-08 14:57:51 +09:00
Jean-Philippe Andre d8b5e5da7b Evas: Remove unwanted file added by accident
From commit 82504d9d77
2015-12-08 14:54:21 +09:00
se.osadchy 82504d9d77 evas: recognize duplicated data structure with eina_quternion and ector.
Summary:
Move data structure and functionality to eina_quaternion from evas_vec4.

Reviewers: raster, Hermet, cedric

Subscribers: jpeg, Oleksander

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-07 16:36:16 -08:00
Chris Michael ef3ef643c2 evas: Fix definition of framespace in canvas eo file
The definition of 'framespace' in the canvas eo file is incorrect.
Framespace is the space occupied by the window frame within the canvas viewport

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-07 15:36:42 -05:00
Daniel Hirt 1d48dd90b2 Evas textblock: fix evas_textblock_cursor_line_set
The line_set function should set the cursor to the first logical
position in the line. We can't use the first text position of the
first item in the line, due to BiDi considerations (the line may be
reordered). I've split evas_textblock_cursor_line_char_first to avoid
code duplication, as it already handles these cases.

@fix
2015-12-07 18:21:00 +02:00
Vincent Torri 3b44645363 efl: add binary mode to f(re)open() calls
This allows better compatibility with Windows

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-05 21:04:36 +01:00
Youngbok Shin 76fa1159c5 Evas textblock: Skip layout logic for an text item which doesn't have font.
Summary:
Evas textblock could cause infinite loop if there is no fonts to use.
If there is no fonts, text_props.text_len is never set.
When text_props.text_len is 0, the for loop in _layout_par runs forever.
It is ridiculous to use Textblock without fonts. But, it shouldn't runs
infinite loop in any situation.

@fix

Test Plan:
1. Remove all of fonts in your EFL or Tizen device.
   (Or you can test it modifying some codes in Textblock by skipping load fonts.)
2. Run elementary_test -to entry3 or see any multiline textblocks.

Reviewers: tasn, herdsman, woohyun

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3402
2015-12-04 14:46:35 +00:00
Jean-Philippe Andre 8f4018b690 Evas filters: Implement mix3 func for rgba masking
This operation was faked by running a mul and a blend ops. Now
they are combined into one. A GL shader should also be able
to do this in a single pass.
2015-12-04 16:10:06 +09:00
Jean-Philippe Andre ecc7da9cba Evas filters: Use Efl.Gfx.Render_Op
Some filters are now broken. Yay for refactoring! Will be fixed
in the following commit.
2015-12-04 16:09:53 +09:00
Jean-Philippe Andre b5500a8644 Evas: Move alpha functions to static_libs/draw
This is a pretty simple code refactor, moving pixel handling
to the new draw lib.
2015-12-03 18:42:50 +09:00
Jean-Philippe Andre 615b2442b7 Ector: Move drawhelper to static_libs
Rename a few things:
 - draw helper -> efl_draw
 - Ector_Rop -> Efl.Gfx.Render_Op
 - ECTOR_ bla bla -> DRAW_ bla bla (base pixel ops)
 - ector_memfill -> draw_memset32 (and invert arg order to match memset)

The main rasterizer file is now draw.h in static_libs/draw
This is a non functional change, simple code refactor.
2015-12-03 18:42:50 +09:00
se.osadchy ce4146ec63 evas: fix bug with logic with eina_matrix in evas_3d_utils
Summary: Also need to fix logically dead code in coverity.

Reviewers: raster, Hermet, cedric

Subscribers: jpeg

Maniphest Tasks: T2832

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-02 14:15:01 -08:00
Cedric BAIL d577366acb evas: properly clean up all memory. 2015-12-02 12:31:59 -08:00
Daniel Hirt 59e9e2ddc8 Evas textblock: fix height on line wrapping
Line advance should finalize the line with its last item, and not the
item we're currently wrapping. This fixes T1583, where some line
wrapping cases would look different than their equivalent <ps>
versions.

@fix
2015-12-02 15:06:32 +02:00
Youngbok Shin 809d8fdafe Evas Textblock: Fix text disappear issue when text is made up with multiple items.
Summary:
Text is disappearing when we resize a singleline Evas Textblock with ellipsis.
It is happened by putting a Text item at logical_items list without considering about logical position.
It is only happended the text is made up with multiple items.
@fix

Test Plan:
1. Run elementary_test
2. Click Label Ellipsis
3. Resize the window dynamically and see the result.

Reviewers: woohyun, tasn, herdsman

Subscribers: jpeg, subodh6129, shilpasingh, cedric

Maniphest Tasks: T2709

Differential Revision: https://phab.enlightenment.org/D3022
2015-12-02 09:52:01 +02:00
perepelits.m 32c33ed64d evas: refactor model's savers and loaders.
Summary:
Move common part to a separated document.
Make code more readable using smaller functions. (from Task T2713)

Reviewers: cedric, raster, Hermet

Subscribers: artem.popov

Differential Revision: https://phab.enlightenment.org/D3373
2015-12-01 16:39:29 -08:00
Youngbok Shin 917fdbd597 evas: fix a NULL dereference issue in font.
Summary:
eina_list_remove returns Eina_List pointer.
It could be NULL if the last list item is removed.
And the returned Eina_List pointer could be different from the given list.
So, calling free for fdir->data after fdir's address is changed is dangerous.
@fix

Test Plan: Run expedite or test app with evas_font_path_append() API.

Reviewers: stefan_schmidt, jpeg

Reviewed By: jpeg

Subscribers: stefan, jiin.moon, cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 15:03:51 -08:00
Stefan Schmidt 3a11868201 evas_3d_utils: do not bitwise AND against 0 in condition
We need to check against the state here and if the compilers assignes 0 to the
first item in an enum we are screwed here as the bitwise AND will always
evaluate to false.

This is a re-incarnation from a486671bce
2015-11-30 17:36:24 +01:00
Stefan Schmidt 54abe37c44 evas_font_dir: do not passed free'd memory to eina_list_remove()
Free the actual memory after we removed it from the list.
2015-11-30 17:36:24 +01:00
Vincent Torri db8d1883d7 Evas: use LC_MESSAGES on Windows to fix compilation
Compilation is broken on Windows because LC_MESSAGES does not exist on this platform
Include Evil.h to provide support of LC_MESSAGES

@fix
2015-11-30 16:28:02 +00:00
Chris Michael 886c20a43b evas-3d: Fix missing field initializers
Clang spits warnings here about missing field initializers for
Evas_Vec3 (missing y and z fields), so we will explicitly initialize
them to 0 (matching the x field).

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-30 09:15:53 -05:00
Tom Hacohen 2c9a79e939 Revert "Evas: Temporarily hack OT_SUPPORT to fix textgrid"
Fixed in upstream, see T2865.

This reverts commit 8ccea8233c.
2015-11-27 12:34:15 +00:00
Stefan Schmidt 043cfaa33b evas_common3d: use void to force empty function parameters
We have to use void in a function declaration if we want no function
parameters. Using just empty parenthesis means the function takes an
unspecified number of parameters.

We had it correct for most declarations and this series fixes it for
the rest.
2015-11-26 17:25:36 +01:00
Youngbok Shin 507baf4891 evas: Add ExtraLight, ExtraBold for font weight.
Summary:
Evas supports UltraLight, UltraBold as font weight.
These terms have same weight value as ExtraLight, ExtraBold.
Some applications, for example, fontforge, use ExtraLight, ExtraBold terms for these weight values.
So, it would be better to support these terms, too.
@feature

Test Plan: None

Reviewers: tasn, woohyun, herdsman

Reviewed By: herdsman

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3126
2015-11-26 10:16:14 +02:00
Jean-Philippe Andre 8ccea8233c Evas: Temporarily hack OT_SUPPORT to fix textgrid
See T2865.
Since Harfbuzz 1.1.0, terminology displays fonts funnily aligned to
the top. This is apparently because until 1.0.6 the y_offset was
always 0 for all glyphs, but since 1.1.1 the offset is actually
set.

This is a TEMPORARY fix. There might be an underlying issue left
here.

Harfbuzz changed behaviour in this commit:

  commit 44f82750807475aa5b16099ccccd917d488df703
  Author: Behdad Esfahbod <behdad@behdad.org>
  Date:   Wed Nov 4 20:40:05 2015 -0800

      [ft] Remove font funcs that do nothing
2015-11-25 16:44:04 +09:00
Subhransu Mohanty 609f74994b efl: make path stroke related api as non virtual.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-24 15:42:29 -08:00
Daniel Hirt 40dfc4a45d Evas textblock: add support for hyphenation wrap style
We now support hyphenation in style. Use "wrap=hyphenation" to use this
wrap option. It will hyphenate based on explicit SOFT HYPHEN (&shy;)
placement in the text, and with the (optional) assistance of dictionaries
compatible with Hunspell's "hyphen" library.

This wrap mode favors breaking at hyphen positions in a word, over moving
the whole word to the next line. It will put an additional "-" at the
break position if it was hyphened.

Enabling the hyphen dictionaries is done by adding these configure
options:
  --enable-hyphen (requires Hunspell's "hyphen" library installed)
  --with-dictionaries-hyphen-dir=DIR (specifies the install location of
          the actual .dic dictionary files e.g. /usr/share/hyphen)

Note that dictionary files are expected to be in the form of "en_US.dic"
or anything that ends with it e.g. "hyph_en_US.dic" (this how they are
        named in Arch Linux).

@feature
2015-11-24 14:31:05 +02:00
Minwoo, Lee 3700be959b evas: Fix text effect which has shadow direction
Summary:
If text object has outline and shadow effect (OUTLINE_SHADOW or OUTLINE_SOFT_SHADOW), and has shadow direction except BOTTOM_RIGHT then outline is not displayed.
So fix logic of style checking.

OUTLINE_SOFT_SHADOW effect of text object is different with text block, so fix it.

Test Plan: Make text obect with OUTLINE_SHADOW or OUTLINE_SOFT_SHADOW effect with any direction except BOTTOM_RIGHT

Reviewers: cedric, woohyun, herdsman, tasn

Subscribers: id213sin

Differential Revision: https://phab.enlightenment.org/D3047
2015-11-23 20:53:29 +09:00
Oleksandr Shcherbina d871ff8d11 evas: remove useless part of code in evas_convex_hull_get function
Summary:
@fix
CID: 1339788

Reviewers: raster, cedric

Reviewed By: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-23 08:20:26 +01:00
Oleksandr Shcherbina 3a56b3f013 evas: fix uninitialize variable in convex_hull_vertex_set function
Summary:
A bit of useless claim, becouse parameter coord always have value 0 or 1 or 2.
May be for escape problem in future.
@fix
CID: 1339781

Reviewers: raster, cedric

Reviewed By: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-23 08:18:53 +01:00
Oleksandr Shcherbina 6866d256e8 evas: fix possible accsess to NULL pointer in Evas.Canvas3d.
Summary:
@fix
CID:1339784

Reviewers: raster, cedric

Reviewed By: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-23 08:16:12 +01:00
Oleksandr Shcherbina 5d4f3b22c4 evas: fix unreachable code in _generate_unic_color_key function in Evas.Canvas3D.
Summary:
Have a sence. It is hard to assume that more that 16 million color will be used.
@fix
CID: 1339790

Reviewers: raster, cedric

Reviewed By: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-23 08:12:00 +01:00
Jean-Philippe Andre 58a1b2767e Evas render: Fix another map clip render issue
This time it's only about performance. We seem to be setting the
changed flag too often, which might trigger unnecessary redraws.

- map flag is set if there is currently a map AND it's not an image
  object (because images can map themselves)
- hmap flag is set if there was a map before

So, map != hmap does not imply a transition between a mapped and
non-mapped state. Add an extra check before marking the clip
as dirty and changed.
2015-11-20 14:23:29 +09:00
Cedric BAIL 412191e5f8 ector: improve uploading of GL texture for vector graphism
This rely on a faster code path to upload dynamic texture. Once we get support
for gbm, we should see significant performance improvement in speed, but this
first step is already a 5 times improvement (Ok, we get from really bad, to not
really useful...).
2015-11-19 14:52:10 +01:00
Youngbok Shin a9b4be11e1 Evas object: Add paragraph_direciton APIs
Summary:
It adds evas_object_paragraph_direction_set, get APIs.
The APIs set or get paragraph direction to/from the given object.
It changes BiDi calculations and affect the direction and aligning of text.
It doesn't have any effect to text without Fribidi library.

The default paragraph direction is EVAS_BIDI_DIRECTION_INHERIT.
If dir is EVAS_BIDI_DIRECTION_INHERIT, paragraph direction is changed
according to smart parent object. If there is no smart parent object,
paragraph direction works as EVAS_BIDI_DIRECTION_NEUTRAL.

@feature

Test Plan:
Test cases included to the following files.
- evas_test_textblock.c
- evas_test_text.c
- evas_test_object_smart.c

Run "make check".

Reviewers: woohyun, raster, herdsman, tasn

Subscribers: c, raster, cedric

Differential Revision: https://phab.enlightenment.org/D1690
2015-11-19 11:43:39 +00:00
Tom Hacohen 1e1e50ca06 Evas text: Fix last up to pos error return value.
This commit also simplifies the code a (tiny) bit.

This fixes the bug introduced in:
392df9479f
2015-11-18 10:56:48 +00:00
Tom Hacohen 3b7ff8ece4 Evas text: Remove useless FIXME. 2015-11-18 10:53:29 +00:00
Subodh Kumar 392df9479f Evas text: Fix memory leak
Summary:
Fix memory leak

Position is getting returned without
freeing the temporary logical item list.

@fix

Test Plan: NA

Reviewers: tasn, raster

Reviewed By: raster

Subscribers: raster, cedric

Differential Revision: https://phab.enlightenment.org/D3345
2015-11-18 10:52:34 +00:00
Daniel Hirt 4c086b6e1b Evas language: add full locale language getter
evas_common_language_from_locale_get truncates the country letters in
the language. We don't always want that (one example is dictionaries).
2015-11-17 16:20:21 +02:00
Tom Hacohen 8fcf9a0fe6 Evas language: Fix language from locale function.
This function was trying to infer from the LANG env var, though it should
have just queried the locale all along, as the language we want is the
system's text language, and not necessarily the LANG variable's value.

@fix.
2015-11-17 12:07:42 +00:00
Subodh Kumar f1cffd7709 Evas text: Remove fixme marker
Summary:
Remove fixme marker

Algorithm used is good enough to sort
very few number of items, usually 2 to 6
items.

Test Plan: NA

Reviewers: herdsman, cedric, tasn

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3312
2015-11-17 11:24:39 +00:00
Subodh Kumar d14dc12d3b Evas text: Remove tabs for readability
Summary: Remove tabs

Test Plan: NA

Reviewers: tasn

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3337
2015-11-17 11:23:44 +00:00
Stefan Schmidt d94120a156 evas polygon: use Eina_Bool for one-bit bitfield
Make sure we are using a unsigned var here. Best go with a Eina_Bool directly.
2015-11-13 13:31:34 +01:00
Minwoo, Lee c196422e63 evas textblock: fixed ascent/descent calculation
Summary:
If textblock has linegap and multi language, ascent/descent calculation is
incorrect.
In _layout_format_ascent_descent_adjust(), descent is accumulated.
(for example, for a line gap of 50, the first line gap is more than 100)

Test Plan:
Textblock has "linegap=50" and multi language (ex.
        "This is a test suite for line gap -
        ഈ ലൈൻ വിടവ് ടെസ്റ്റ് ടെസ്റ്റ് ടെസ്റ്റ് ടെസ്റ്റ് ഒരു പരീക്ഷണ വെയര് ")
Added test suite in evas_test_textblock.c file.

Reviewers: tasn

Subscribers: subodh6129, cedric

Differential Revision: https://phab.enlightenment.org/D3311
2015-11-13 12:27:59 +00:00
Tom Hacohen 592b786645 Evas text: Change bitfield bool types to Eina_Bool.
This is really just a safety measure, as we always just check if the value
is true. However, with char the potential values are -1 and 0, and with
Eina_Bool they are 1 and 0, so fixing that.

Thanks to the "sparse semantic parser" for detecting that, and to Stefan
for reporting.
2015-11-12 15:49:45 +00:00
Daniel Zaoui 10d5768ef7 Evas: import Evas types inside canvas Eo file 2015-11-11 15:40:56 +02:00
Joogab Yun 25bcf4c64f Evas: Fix bug in evas_cache_image_dirty()
Summary: Code which shouldn't be removed was removed by '800279c23bdb0e925f112c96516dcc96a5487684'

Reviewers: spacegrapher, cedric, jpeg

Reviewed By: jpeg

Subscribers: scholb.kim, dkdk, wonsik, cedric

Differential Revision: https://phab.enlightenment.org/D3278
2015-11-11 14:35:24 +09:00
Oleksandr Shcherbina 13b1756394 evas: add possibility to render current 3D scene to texture in Evas.Canvas3d
Summary:
Refactoring code of functions e3d_drawable_scene_render,
e3d_drawable_scene_render_to_texture,_shadowmap_render to have possibility
render in scene to additional texture
See T2761

Reviewers: Hermet, cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-10 15:10:13 -08:00
se.osadchy 33809c969c evas: fix bug in evas_canvas3d_camera.
Summary: Change Eina_Quaternion to Evas_Vec4.

Reviewers: cedric, Hermet, raster

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-10 14:10:43 -08:00
Jean-Philippe Andre 7974f674aa Evas: Allow edje_decc to work with ETC images
This reuses the internal function data_get, data_put, image_save
respecting the border information and adding support for ETC
formats.

@fix
2015-11-10 16:12:21 +09:00
Jean-Philippe Andre 64de2f6ce5 Evas: Add some internal engine APIs
- image_file_colorspace_get
   This will be used to determine the best loading format, especially
   targeted at edje_cc / edje_decc so we can avoid ETC re-encoding.

- image_data_has
   Checks whether the image is currently loaded in (CPU) memory,
   and also returns the current colorspace.
2015-11-10 16:12:21 +09:00
Subodh Kumar 3f0d0daf0d evas: fix some indentation and formatting in textblock.
Summary: Fix some indentation and formatting.

Reviewers: herdsman, tasn

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 15:39:13 -08:00
Oleksandr Shcherbina 3af65dd4e2 evas: unification of color pick mechanism.
Summary:
Use same way using color pick under GLES and not:
 Use GL_RGBA texture insted of GL_RED
 Generate and pass to engine 3 components color of mesh
See T2761

Reviewers: cedric, Hermet

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 15:27:26 -08:00
Bogdan Devichev 8ab190daec evas: add common part of savers and loaders.
Summary:
Common part will make savers and loaders shorter and easier for understanding and refactoring.
https://phab.enlightenment.org/T2713 - due to this task.
Should be merged after https://phab.enlightenment.org/D3030

Should be merged to start adding refactored savers and loaders.

Reviewers: Hermet, raster, Oleksander, cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 15:27:26 -08:00
Bogdan Devichev f416f5adde evas: move model save/load from common to common3d.
Summary:
Move model save/load to common3d.
Here also will be common algorithms  and structures which will be used in all loaders and savers.
See task https://phab.enlightenment.org/T2713.

Reviewers: cedric, Hermet, raster, Oleksander

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 15:27:26 -08:00
se.osadchy 3d77f55f91 evas: refactor duplicated data structure with eina_matrix.
Summary: Move data structure and functionality to eina_matrix from evas_mat.

Reviewers: raster, Hermet, cedric

Subscribers: Oleksander, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 15:27:26 -08:00
perepelits.m 3031a4a5c6 evas: API for Convex Hull in Evas.Canvas3d
Summary: This API builds vertex and index data of convex hull around the given mesh.

Reviewers: raster, perepelits.m, Hermet, cedric

Reviewed By: cedric

Subscribers: cedric, artem.popov

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 14:29:46 -08:00
Jean-Philippe Andre 16195d3100 doc: Deprecate filter reference page and link to the wiki 2015-11-09 16:21:45 +09:00
Carsten Haitzler 483cec924b evas - patch in one more if check for obj layer to avoid shutdown crash
this should fix T2715
2015-11-05 09:41:35 +09:00
Vitalii Vorobiov aefcb11444 Evas Text: avoid SIGSEV while ellipsis recalculation
Summary:
Fix Segmentation Fault when TEXT part getting resized and when it has
some params (for example ellipsis).

Fix T2640
@fix

Test Plan: Refer to T2640

Reviewers: raster, Hermet, seoz, herdsman, cedric, reutskiy.v.v, NikaWhite

Subscribers: stefan_schmidt, tasn, cedric

Maniphest Tasks: T2640

Differential Revision: https://phab.enlightenment.org/D2944
2015-11-04 13:58:59 +09:00
Jean-Philippe Andre 6e96d75c76 Evas: Remove dead code (cached surfaces)
While cached surfaces is a topic we're discussing recently,
this code is dead right now, and we will have to redesign the
buffer caching better to handle proxies, maps, smart objects, etc...
2015-11-02 16:22:19 +09:00
Jean-Philippe Andre b4fc15311c Evas render: Fix 'no_render' when object is proxy source
When the no_render flag was set on a proxy source, the object would
not be visible, but it would also not render inside the proxy surface,
which completely beats the purpose of this flag. This patch makes
the objects render inside a proxy surface.
2015-11-02 13:40:00 +09:00
Amitesh Singh 7ff30befd1 evas box: don't allow duplicate child append
Add check for duplicate child addition and return null.
2015-10-30 13:49:03 +05:30
Jean-Philippe Andre cc5cccc511 Eet: fix decoding of embedded ETC images
Typos, lack of NULL check, excessive sizeof(type) not matching
the object type, no border set, etc... This all lead to a crash
and then no render (with an error message and then without...).

This also simplifies the implicit loading of ETC1 as ETC2 when
supported by the driver.

@fix
2015-10-29 17:58:34 +09:00
Jean-Philippe Andre 8937fd4fc9 Evas render: Fix rendering of snapshot objects
I added a quick check that the clip was not 0x0 but forgot
to check that we actually use the clip info.

Fixes T2792
2015-10-23 16:30:37 +09:00
Srivardhan Hebbar be464e5843 evas: handling memory leak on realloc failure.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-21 13:40:01 -07:00
Subodh Kumar 6bd863cf4f evas: fix memory leak.
Summary:
Fix memory leak

Delimiter string is being saved using
eina_stringshare_replace without any del or free
when object is deleted.

@fix

Test Plan: NA

Reviewers: cedric, tasn, herdsman

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-20 14:01:15 -07:00
Subodh Kumar 69c2b13474 evas textblock: fix memory leak
Summary:
Fix memory leak

Delimiter string is being saved using
eina_stringshare_replace without any del or free
when object is deleted.

@fix

Test Plan: N/A

Reviewers: tasn, herdsman

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-19 11:34:41 -07:00
Jee-Yong Um 49028c599a evas table: fix miscalcuation in cells with span and padding
Summary:
In evas table that homogeneous mode is turned off,
the size of items in cells, whose rowspan or colspan is larger than 1
and horizontal or vertical padding exists, are miscalculatd.

T2655

@fix

Test Plan: elementary_test "Table Padding"

Reviewers: Hermet, cedric

Subscribers: cedric, DaveMDS, Hermet

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-19 11:01:23 -07:00
perepelits.m 2d52eedf06 evas: fix memory leak
Summary:
Fix of memory leak in evas_3d_utils.c

@fix

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

Subscribers: artem.popov

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-19 11:00:25 -07:00
Carsten Haitzler 1a135fdfb1 evas - clean if check to be a single return point for clarity
if (a) return;
if (b) return;

->

if ((a) || (b)) return;
2015-10-17 11:19:06 +09:00
Carsten Haitzler a47d14e246 evas - add another layer->evas check in addition to layer
fixes T7215
2015-10-16 08:27:10 +09:00
Carsten Haitzler 0bca7af2e8 evas - was missing evlogs for the threaded rendering handling - fix 2015-10-15 19:29:40 +09:00
Amitesh Singh 8e87e56a7c evas: render - use evas_object_clipees_has instead of evas_object_clipees_get
evas_object_clipees_has is far cheaper than evas_object_clipees_get in case of checking if
clipees exist or not. This should improve the performance in case of large set of clipees.

@fix
2015-10-15 15:02:22 +05:30
Cedric BAIL 229106963a evas: no need to compute clippees list if we just want to know if there is any.
This is a partial fix for a terrible performance scenario where application take
forever to close with a large number of edje object.

@fix
2015-10-14 16:18:37 -07:00
Amitesh Singh 63634ccd30 evas filter: silent coverity on self assignment
This is a false alarm. Just to make coverity happy, use eo_do
instead of eo_do_ret

CID: 1316017
2015-10-14 21:08:20 +05:30
Chris Michael 3fb78e137b evas: Fix clang warning for missing field 'async' in default_state
Evas_Object_Filter_Data has a bool for 'async' at the end of the
struct. This field was missing from the initialization of
'default_state'

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-14 09:28:47 -04:00
Carsten Haitzler 620dc45af9 evas - obj destructrion - handle when obj layer is partly destroyed
this should fix T2715 and anything similar as during destruction
object internals are a bit weird.
2015-10-14 14:50:54 +09:00
Carsten Haitzler 094b781b7f evas - fix evlog to push and pop properly 2015-10-14 14:50:53 +09:00
Jean-Philippe Andre c22fa8a96a Evas: Some coverity fixes
This are false alarms. But the explicit null check doesn't hurt.
Also, Coverity doesn't like eo_do_ret. Neither do I. :)

- CID 1327246
- CID 1327245
2015-10-14 11:27:47 +09:00
Jean-Philippe Andre cfedba598c Evas render: Fix proxy source_clip with source images
In case the source is an Evas_Image, we skip proxy_subrender,
and so the clip was not set against the source clip.
2015-10-14 11:14:36 +09:00
Jean-Philippe Andre 7b266b5518 Evas render: Fix proxy source_clip logic inversion
As spotted by @FurryMyad I inverted the logic for source_clip.
This should restore the proper behaviour while keeping my previous
fixes working. See D2940.
2015-10-14 11:14:36 +09:00
Cedric BAIL 8a39069b64 evas: fix performance regression by reducing the unecessary memcpy we are doing.
Actually copying max is pretty useless and super slow. We usually have something
like 1024 slot in a context, but a very small amount of them are acutally active.
It would be better to actually do some kind of copy on write technique here, but
as Eina_Cow doesn't handle array and we are close to a release, let's be
conservative.
2015-10-13 12:10:34 -07:00
Jean-Philippe Andre dc397fabff Evas filters: Fix some build warnings
Thanks Tom for spotting one of those
2015-10-12 13:44:44 +09:00
Jean-Philippe Andre d271afd66c Evas filters: Fix some crash and reduce insanity
In a rare situation the filter would access an invalid buffer.

Solution: Stop messing with buffer references by properly
referencing and releasing them when not needed, rather
than stealing references and hoping for the best. (There were
flags tracking stolen references, but that was still madness)
2015-10-12 13:44:44 +09:00
Jean-Philippe Andre a8243ed382 Evas: Add engine function image_ref
This is to simplify and fix filters. This is an internal function.
2015-10-12 13:44:44 +09:00
Jean-Philippe Andre 62940b41f2 Evas filter: Fix proxies of filtered images
@fix
2015-10-12 13:40:20 +09:00
Jean-Philippe Andre 57afb0986b Evas render: Don't render deleted / invisible snapshots
Don't render them. They are not visible
2015-10-12 13:40:20 +09:00
Jean-Philippe Andre ff706b7e53 Evas render: Minor debug code improvements 2015-10-12 13:40:20 +09:00
Jean-Philippe Andre 512fb7f193 Evas snapshot: Fix proxies of snapshot objects
This was broken because the wrong image size was used
in the proxy's fast path (proxy of another image).
Why did snapshot use a specific surface_w,h instead of
reusing the usual cur->image.w,h? (@cedric)

Simplify code.
2015-10-12 13:40:20 +09:00
Oleksandr Shcherbina d61e8522e4 evas_canvas3d: fix mesh being added twice added to scene data
Summary: @fix

Reviewers: cedric, Hermet

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-09 10:00:32 +02:00
Jean-Philippe Andre 6e04d407cf Evas filters: Fix crash with async sw rendering
If the filtered object (text or image object) was deleted, its
output image (cached inside the filter data) would be freed
immediately. This could cause crashes in case of async rendering.

@fix
2015-10-07 18:11:32 +09:00
Jean-Philippe Andre b031bbee9b Evas textblock: Force relayout during proxy render
If the textblock object was not visible in the main canvas, but
still needs to be rendered in a proxy surface, then _relayout may
not have been called. This forces generation of paragraphs based on
the current geometry.

This patch is ugly. I know. This is evas render :)
2015-10-07 10:48:18 +09:00
Jean-Philippe Andre 2b47181f4e Evas render: Fix another bad proxy clipping issue
This is an ugly hack to fix an issue reported in D3114. I don't
understand how the proposed patch could even fix anything given
the current situation.

Test case:
 - Create edje object with textblock inside
 - Clip out edje object (--> all children become not visible)
 - Take textblock from edje and set it as source of a proxy
 - Mark proxy as source_clip

Result: Nothing visible.

Expected: Proxy should contain the textblock object, since
  source_clip means we ignore the edje object's clipper, and
  only care about the textblock's clipper (entire canvas).

Here's what was happening:
 - During a first pass, textblock is not visible, cur->cache.clip
   is calculated, marked as clip_use=1 with geom 0,0 0x0
 - In a second pass, the proxy is rendered, which needs to draw
   the textblock in a surface. But cache.clip was used and it was
   wrong.

Solution:
 - Ignore cache.clip when rendering inside a proxy. I'm pretty
   sure there are other instances where cache.clip will still
   be a problem.

Problem: textblock never called relayout since it was not
  visible.

Conclusion: cache.clip needs to die. It's a legacy optimization
  that now causes more issues than it fixes.
2015-10-07 10:48:18 +09:00
Dongyeon Kim c92e670143 Evas image: Fix wrong usage of engine data macro
ENDT macro should be passed to engine functions instead of
some other function pointer!
@fix
2015-10-06 14:55:20 +09:00
Carsten Haitzler 5801013ad4 evas - region updates - go back to tiler as its faster
the overhead didnt show up in y tests. do show up with certain
expedite tests. hmmm. last time i messed with region code it was
actually same speed as tiler. bonus was it was fully accurate.
2015-10-05 18:41:00 +09:00
Carsten Haitzler 8f69d5202a evas rectangle - ensure centers of rects that just move/resize dont rend
calculating updates has been re-rendering centers fo solid rects if
the solid rects moves/resizes with a lot of overlap and objects
underneath changes - their changes show through. this fixes that

@fix
2015-10-05 18:30:34 +09:00
Carsten Haitzler f169d7ed27 evas - cutouts - use less cpu by skipping non-intersecting cutout objs
@feature
2015-10-05 15:51:02 +09:00
perepelits.m 0dd60ced44 evas-3d: fix primitives
Summary:
There were warnings after adding primitive in the same frame more then once, the check was added to avoid it

@fix

Reviewers: cedric, raster, Hermet

Subscribers: cedric, artem.popov

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-04 16:37:28 +02:00
Subodh Kumar 4290567fd6 evas_box: fix children size and position calculation when padding is used for horizontal flow layout
Summary:
Fix children size and position calculation when padding is used

For each child size calculation padding is adjusted
but box height should include  padding.
Secondly, x and y position of children should not  include
the vertical and horizonatal padding as child size has already
included the given paddings.

@fix

Test Plan:
Please modify test_box.c file in
function test_box_vert2 as follows:

   bx = elm_box_add(win);
   evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_win_resize_object_add(win, bx);
   elm_box_padding_set(bx, 50, 50);
   elm_box_layout_set(bx, evas_object_box_layout_flow_horizontal, NULL, NULL);
   evas_object_show(bx);

Now,
1. open elementary_test
2. box
3. Box vert 2 (observe box is broken)
4. Try resizing the window (observe)

Reviewers: raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-04 16:22:49 +02:00
Carsten Haitzler 8a4ddea224 evas render - async sw - fix context duplication by using proper dup call
valgrind pointed this one out. we access freed memory when we dup a
context because the context CONTAINS ptrs to things like rects for
cutouts. we didnt dup these. use the proper context dup call (and
properly ref pixman color image too). this was a random bug/crash
waiting to happen and valgrind caught it. suprising it hasnt turned up
before :/

@fix
2015-10-04 16:58:42 +09:00