Commit Graph

2365 Commits

Author SHA1 Message Date
Jean-Philippe Andre 06cf9e6bea Evas.Image: Complete implementation of proxy and snapshot
This moves the EO APIs away from Evas.Image and adds the required
legacy bindings.
2016-03-15 11:11:59 +09:00
Jean-Philippe Andre 68beccd1a9 Evas.Image: Add new classes Snapshot and Proxy
Efl.Canvas.Snapshot and Efl.Canvas.Proxy are specialized
classes previously implemented as features of Evas.Image.

Note: this half of the work, as I suffered from a bad
merge and rebase with my work branch on top of master.
2016-03-15 11:11:59 +09:00
Jean-Philippe Andre 0fc0db0020 Evas: Add internal macro EVAS_OBJECT_LEGACY_API
This checks whether the object was created with a legacy
API, ie without not using eo_add directly. This will be used
to help with the transition from EAPI to EO APIs, as some EAPIs
should not be used with the new EO types (eg. file_set on a
Proxy object).

By default it doesn't do anything besides ERR().
In DEBUG mode, it will return immediately.

The macro will return if eo_obj is NULL.
2016-03-15 11:11:59 +09:00
Jean-Philippe Andre c52a53c3dc Evas Image: Implement Gfx.Buffer get/set/copy_set APIs
Those APIs should provide a cleaner interface than the
old data_set/data_get APIs, by making sure the operations are
atomic (ie. no need to call size_set, cspace_set and then data_set).

padding/duplicated borders are not supported.

TODO: Implement legacy API on top of the new API, instead of
      this quick patch
2016-03-15 11:11:59 +09:00
Jean-Philippe Andre ba53f0e785 Efl.Gfx.Buffer: Introduce buffer_set/get/copy_set
Hopefully the doc and signature are better than the current
evas image equivalents data_get/data_set.

Those APIs are not like map/unmap so we need to decide which
model we prefer.
2016-03-15 11:11:59 +09:00
Jean-Philippe Andre b458341a13 Efl.Gfx.Buffer: Add interface skeletton 2016-03-15 11:11:59 +09:00
Jean-Philippe Andre e3de15d726 Efl.Image: Fix documentation for ratio + implement in evas image 2016-03-15 11:11:59 +09:00
Jean-Philippe Andre fd2c4b4a26 Evas image: Create interface Efl.Image.Animated
This interface groups all low-level animated image functions.

FIXME:
- Rename to Efl.Image.Animated once eolian is fixed
- Fix mess with emile enum (loop_hint)
2016-03-15 11:11:59 +09:00
Jean-Philippe Andre 544ae716ed Efl.Image: Improve documentation a bit
This interface needs to be extended and cleaned up... this will
happen in the following patches.
2016-03-15 11:11:59 +09:00
Jean-Philippe Andre b5d87aef1c Efl.Gfx.View: Rename property size to view_size
size is an insanely generic name, so there would be clashes
in language bindings. Use eo_prefix.
2016-03-15 11:11:59 +09:00
Jean-Philippe Andre 2d10127524 Evas image: Move filled property to Efl.Gfx.Fill and set as default
The filled property should be set to true by default since it
makes more sense. Legacy APIs behaviour is preserved by setting
the default to false.
2016-03-15 11:11:59 +09:00
Jean-Philippe Andre e9508ea80e Efl.Gfx.Fill: Remove fill_spread
It's not actually implemented anywhere. There's a flag that's
never read. Proper support would require quite some work.

Once we actually implement fill_spread support, we can bring
the API back without breaking compatibility.
2016-03-15 11:11:59 +09:00
Jean-Philippe Andre b640cb5ba9 Evas filters: Simplify evas_filter_dirty
Objects can mark themselves as changed rather than having all this
duplicated code inside the mixin.
2016-03-15 11:11:59 +09:00
Cedric BAIL 0ff7429ea7 evas: move Evas_Polygon to become Efl_Canvas_Polygon.
TODO: add support for 2 points (aka line).
2016-03-14 15:12:52 -07:00
Boris Faure b0d039aa02 evas_text_grid: display bold/italic/bolditalic fonts if available 2016-03-12 18:42:50 +01:00
Boris Faure f3dc094310 evas_text_grid: remove optimisation (will come back later) to make code more readable 2016-03-12 18:10:03 +01:00
Tom Hacohen 66b4290d91 Revert "Vg node: modify so the eo_add migration script won't break."
This reverts commit 6ac1fb78d8.
2016-03-11 12:29:03 +00:00
Tom Hacohen f24210caac Revert "Automatic migration to the new eo_add syntax."
This reverts commit 4f949a2757.
2016-03-11 12:29:03 +00:00
Cedric BAIL 685681c864 efl: rename efl.core.animator to efl.animator.
It has been decided that we would not use any namespace for interface
and they will sit in efl main namespace.

This patch doesn't correct the naming of the event has we don't have a
prefix for event. We do still have EFL_ANIMATOR_EVENT_ANIMATOR_TICK,
instead of a nicer EFL_EVENT_ANIMATOR_TICK.
2016-03-10 13:14:13 -08:00
Tom Hacohen 4f949a2757 Automatic migration to the new eo_add syntax. 2016-03-09 16:09:14 +00:00
Tom Hacohen 6ac1fb78d8 Vg node: modify so the eo_add migration script won't break. 2016-03-09 16:09:14 +00:00
perepelits.m 74161be6f8 Evas: fix camera node adding to scene
Summary: While making new changes after rewieving D3710 we met this bug again, removing eo_unref is the best way to fix it because _eo_ref_replace from D3021 makes nothing special.

Reviewers: cedric, raster, Hermet

Subscribers: jpeg, artem.popov

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-04 16:09:51 -08:00
jiin.moon 41b8a320a0 evas: fix preload thread deadlock issue
Summary: Wrong condition makes deadlock issue.

Reviewers: jpeg, jypark

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-04 16:09:51 -08:00
Tom Hacohen f1b1c5354b Manually fix extra eo_do calls that were added after I migrated 2016-03-03 10:03:55 +00:00
Tom Hacohen 23a6b12183 Fix migration script mistakes and compilation warnings.
Mostly unused vars following the removal of eo_do_ret().
However, there are some cases where the migration script got some things
wrong, and I had to manually fix them.
2016-03-03 09:58:08 +00:00
Tom Hacohen f21ade6123 Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
2016-03-03 09:58:08 +00:00
Tom Hacohen 438e1db893 Manually semi-migrate files in preparation for the script
The migration scripts breaks with some weird cases, here I manually
migrated some parts, and just removed the eo_do from others without
actually migrating (so I could deal with that later).
2016-03-03 09:56:20 +00:00
Jean-Philippe Andre bbc616e064 Evas filters: Fix meaning of data 'execute' flag
The doc said it would behave like "value = data" but actually
the data part was executed directly. This should fix that.
2016-03-02 13:11:29 +09:00
Jean-Philippe Andre bafe723991 Evas filters: Mark object as changed on data_set
This fixes the new test case.
2016-03-02 12:57:23 +09:00
Jean-Philippe Andre 2409784df1 Evas text: Add legacy filter APIs
Those should now be considered stable, even if their internals
may change. Also, these APIs are in Tizen so adding these will
help merging Tizen EFL and upstream.
2016-03-02 12:57:23 +09:00
Jean-Philippe Andre b369989a79 Evas filters: Fix bad stringshare usage
Make sure the filter uses properly initialized state names and
don't call stringshare_del on a static string.
2016-03-02 12:57:23 +09:00
Jean-Philippe Andre 24f19dc770 Efl.Gfx.Filter: Rework APIs and mark as stable
- Remove @beta flags,
- Update @since to match stabilization,
- Change methods to properties with keys,
- Use eo_prefix and add filter_ prefix to all properties since
  they use very generic names,

The filter API stays under Efl.Gfx since there are other kinds of
filters, and this one is the particular "graphical filter" or
"effect" API.

The EO API mostly not change from an application point of view,
except for "source_get" which now returns a string directly. Also,
state and data can now be queried.
2016-03-02 12:57:23 +09:00
Carsten Haitzler e167154520 evas render2 - move empty region data into const land so it is in RO mem
this should ensure these constants are in read-only memory if
possible iof they are marked as const as well as static
2016-03-01 13:13:33 +09:00
Carsten Haitzler 1585d242da evas - render2 - silence new gcc warnings about possibly freeing static
This one is new:

In file included from lib/evas/canvas/render2/evas_render2.c:5:0:
In function ‘_region_break.isra.5’,
    inlined from ‘region_add’ at
lib/evas/canvas/render2/region.c:847:41:
lib/evas/canvas/render2/region.c:107:62: warning: attempt to free a
non-heap object ‘_region_brokendata’ [-Wfree-nonheap-object]
 #define FREE_DATA(reg) if ((reg)->data && (reg)->data->size)
free((reg)->data)
                                                              ^
                                                              lib/evas/canvas/render2/region.c:184:4:
note: in expansion of macro ‘FREE_DATA’
    FREE_DATA(region);

While it won't actually free is because if using brokendata the size
is 0 and it'll skip it, add in a check to see if region->data is the
brokendata static
2016-03-01 13:09:50 +09:00
Shuhrat Dehkanov f3d978e04c Update documentation text
Summary:
The word 'english' has several issues:
 - the whole documentation and source code is in English,
   there is no point in mentioning here specifically
 - the character 'E' needs to be capitalized, as in
   Ecore, Evas, Elementary

Reviewers: zmike, herdsman

Subscribers: cedric, seoz, jpeg

Differential Revision: https://phab.enlightenment.org/D3740
2016-02-29 07:02:20 -05:00
Tom Hacohen e71e6561ee Eo callbacks: Migrate all of the EFL to the new event cb signatures. 2016-02-29 11:33:27 +00:00
Daniel Hirt 409f45478b Evas textblock: add a stringshare fastpath to markup_set
This optimization makes use of already stringshare'd text and avoids
unnecessary stringshare_add calls in markup_set. It improves the
performance of edje_calc when reapplying text to the textblock part.
2016-02-29 08:59:24 +00:00
Daniel Hirt c7d45032dd Evas textblock: fix cached markup's stringshare refs
The last fix 34020ed131 was missing a
stringshare_del for the NOP case of markup_set. It led to a
constantly increasing ref count of the cached markup.

@fix
2016-02-28 18:00:08 +02:00
Jean-Philippe Andre 17e3f8c1a6 Evas Filter: Use Eo.Base.constructor in the mixin
This is made possible by inheriting first from an interface
instead of Eo.Base, thus implementing the Eo.Base interface.
2016-02-26 18:36:23 +09:00
Tom Hacohen 34020ed131 Evas textblock: Fix markup cache, was completely broken.
The markup cache was completely broken. It was not compared correctly,
so it wasn't even used, but regardless it was cleared just after being
set in some of the cases.

This is the first part of a performance regression fix in elm label.

@fix
2016-02-26 09:13:38 +00:00
Tom Hacohen 8c1933c388 Evas image: Migrate all the remaining types to Eolian. 2016-02-17 12:24:22 +00:00
Tom Hacohen 094a1f2b5e Evas canvas3d: Fix Eolian warnings.
This includes either migrating types to eolian, fixing namespace or
importing extra types.
2016-02-17 10:22:34 +00:00
Tom Hacohen 1c8ae97b83 Evas canvas3d mesh: Fix Eolian warnings.
This includes either migrating types to eolian, fixing namespace or
importing extra types.
2016-02-17 10:00:11 +00:00
Tom Hacohen 82caec2888 Evas canvas3d texture: Fix Eolian warnings.
This includes either migrating types to eolian, fixing namespace or
importing extra types.
2016-02-17 09:48:34 +00:00
Youngbok Shin d9b93542cf Evas font: allow ":fallbacks" keyword when Evas parses font keyword
Summary:
Developers could use fallback fonts using only font_fallbacks keyword.
The keyword is only allowed for Evas Textblock. It has to be common
feature for other text type objects.
Applying this patch, Text and Textgrid can add fallback fonts.
@feature

Test Plan:
Set font like the following example to Textblock, Text, Textgrid.
Sans:fallbacks=Inconsolata

Reviewers: tasn, herdsman, woohyun

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3704
2016-02-17 09:23:06 +00:00
se.osadchy 780ec5d029 evas: Update evas_3d_utils, replace Evas_Vec.
Summary: Change Evas_Vec2(3) to Eina_Vector2(3).

Reviewers: cedric, Hermet, jpeg

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3686
2016-02-17 16:12:35 +09:00
Youngbok Shin 471c7635ee Evas Text: Update text layout when ellipsis is changed without resize
Summary:
When only ellipsis is changed from 0.0~1.0 to -1.0 without resize,
the text is never updated. Because, previous state for ellipsis is never kept
and used properly to check when Evas Text needs to be updated.

It does not have any effect when ellipsis is changed from -1.0 to 0.0~1.0.
Because, Evas text always resize itself according to its text size.
So, necessarily, Evas text object has to be resized to the smaller size.
Commonly, Edje will handle its size if Evas text needs to be ellipsized.
@fix

Test Plan: Test case is included.

Reviewers: tasn, woohyun, herdsman

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3448
2016-02-16 17:42:11 +02:00
Tom Hacohen 511c4deb84 Evas box: Fix Eolian warnings.
This includes either migrating types to eolian, fixing namespace or
importing extra types.
2016-02-16 14:33:32 +00:00
Tom Hacohen 0fa24ee175 Evas out: Fix Eolian warnings.
This includes either migrating types to eolian, fixing namespace or
importing extra types.
2016-02-16 10:06:46 +00:00
Tom Hacohen 9c44e1c2dd Evas ector buffer: Fix Eolian warnings.
This includes either migrating types to eolian, fixing namespace or
importing extra types.
2016-02-16 09:48:22 +00:00
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