Commit Graph

1694 Commits

Author SHA1 Message Date
Cedric BAIL 2e6cc1a173 evas: fix prototype and correctly call the function. 2015-04-03 16:14:47 +02:00
Cedric BAIL ea9330bfe8 evas: declare internal evas_vg helper. 2015-04-03 16:14:46 +02:00
Cedric BAIL ae5472379f evas: handle path set on shape object. 2015-04-03 16:13:13 +02:00
Cedric BAIL 1e5c596ca3 evas: implement stupid bound get at container level. 2015-04-03 16:13:12 +02:00
Cedric BAIL 7f072eb607 evas: add Efl.File interface to Evas_Object_VG. 2015-04-03 16:13:11 +02:00
Cedric BAIL 161b7b93e2 evas: add Evas_VG_Image. 2015-04-03 16:13:07 +02:00
Cedric BAIL fa2f4e969e evas: implement Evas_VG_Node stacking functions. 2015-04-03 16:13:06 +02:00
Cedric BAIL 9dcf840ade evas: Evas_VG_Root_Node should only be attached to an Evas_Object_VG. 2015-04-03 16:13:05 +02:00
Cedric BAIL 95e70ee5cb evas: remove unecessary duplicated code. 2015-04-03 16:13:03 +02:00
Cedric BAIL 45ccb8f6d1 evas: add utility function to build path. 2015-04-03 16:13:00 +02:00
Cedric BAIL 9ba6e1a0ae evas: add initial Evas_Object_VG.
Evas_Object_VG is meant to become an object that can hold a SVG
scenegraph inside of it.
2015-04-03 16:12:59 +02:00
ChunEon Park 2b0fb1ea1d evas/common Fixed incorrect blend pixel color logic in neon.
previously, it had the remaining value issues on blending computation.
The blending color result was in correct.

Signed-Off-By: Vladimir Kuramshin <v.kuramshin@samsung.com>
2015-04-03 19:48:30 +09:00
Youngbok Shin b8b6c1e1a8 evas: Add safety check for NULL pointer of clipper.
Summary: It caused crash when clipper is NULL and it makes evas test-suite fail.

Test Plan: Run evas test-suite. (make check)

Reviewers: woohyun, tasn, herdsman, Hermet

Reviewed By: Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2215
2015-03-24 12:53:34 +09:00
ChunEon Park 105b0d75ee evas: prevent crash.
if user delete the interceptor in the interceptor callback,
the interceptors would be NULL.
So we need to check whether it's valid or not.

@fix
2015-03-23 22:00:27 +09:00
Carsten Haitzler 2347c6ff01 evas render2 - restructure it to be an explicit api call - cleaner to do 2015-03-20 18:03:54 +09:00
Jihoon Kim 80d9e0fbaa evas: fix description about Evas_Device_Subclass 2015-03-20 14:43:23 +09:00
Youngbok Shin 262dd3a139 evas: fix build failure with old version freetype.
Summary:
Fix build failure with old version freetype.
It is caused for supporting colored font.

Reviewers: raster, jpeg, woohyun, Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2200
2015-03-20 13:24:31 +09:00
Carsten Haitzler 377e94263b evas - font - new color bitmap support - rename funcs to match file 2015-03-20 10:49:49 +09:00
Youngbok Shin e197f8804f evas: Support bitmap embedded color font.
Summary:
Add the code for getting bitmap buffers from embedded color font,
And draw the bitmap buffers as images.
For drawing the bitmap buffers as images,
evas_common_draw_context_font_ext_set internal API is changed to
pass additional gl engine functions.
T2139
@feature

Test Plan:
1. Set a bitmap embedded color font to textblock.
2. Set a unicode emoticon text.
3. See the result.

Please check the sample unicode in the following link.
http://www.fileformat.info/info/unicode/char/1f3af/index.htm
http://www.fileformat.info/info/unicode/char/1f555/index.htm
http://www.fileformat.info/info/unicode/char/2600/index.htm
http://www.fileformat.info/info/unicode/char/263a/index.htm

Reviewers: tasn, woohyun, jpeg, raster

Reviewed By: raster

Subscribers: herdsman, cedric

Differential Revision: https://phab.enlightenment.org/D2084
2015-03-19 19:02:03 +09:00
Youngbok Shin 6616d11619 evas/font: Add evas_font_reinit API.
Summary:
Reinitialize FontConfig. If FontConfig has to be reinitialized
according to changes of system enviroments(ex. Changing font config files), it will be useful.

Reviewers: woohyun, seoz, tasn, cedric, raster

Reviewed By: raster

Subscribers: raster, herdsman, cedric

Differential Revision: https://phab.enlightenment.org/D1962
2015-03-19 18:01:42 +09:00
Bryce Harrington 27920d31c1 Spelling fixes
Summary:
emmited  ==> emitted
resistence  ==> resistance
occured  ==> occurred

Reviewers: cedric, zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2192
2015-03-18 21:38:33 -04:00
Dmytro Dadyka 31651a8842 evas: Evas_3D - add alpha testing.
Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: Ievgen, cedric

Differential Revision: https://phab.enlightenment.org/D2046
2015-03-18 15:22:20 +01:00
Cedric BAIL b5cea1703d evas: use Emile for defining all possible loader API. 2015-03-17 09:58:18 +01:00
Youngbok Shin 84634ea51f evas/clip: If the clipper is image or has color, clipped area should be redrawn.
Summary:
If the clipper is image or has color, it affects to its clipees.
Even if we unset the clipper or change the clipper to another object,
it seems the clipper is not changed.

Test Plan:
Make two clipper objects and one clipee object.
And make clip the clipee according to following example

ex) Clipee object -> inner_clipper -> clipper

evas_object_clip_set(clipee, inner_clipper);
evas_object_clip_set(inner_clipper, clipper);

After checking the result and hide inner_clipper.

evas_object_clip_set(clipee, clipper);
evas_object_hide(inner_clipper);

See the result.

Reviewers: raster, cedric, Hermet, jpeg

Subscribers: woohyun, cedric

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

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>

Note: Technically we should not check the color of the fact that
      the clipper is a mask and not a simple rect. But because of
      real-life performance issues, damage_add was disabled so we're
      trying to keep the perf in most cases while being correct in
      cases where the clipper is visually important.
2015-03-17 11:13:29 +09:00
Dongyeon Kim 0ff8936de8 Evas GL: Adjust function naming and remove macros
Summary:
Change function and variable names to more suitable ones.
Remove FBO_FUNC macros.
Little tidying up from previous commit.

Test Plan: Local Evas GL tests for 1.1, 2.0, and 3.0

Reviewers: jpeg

Subscribers: cedric, mer.kim, mythri, wonsik

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

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-03-16 15:56:49 +09:00
Dongyeon Kim d8fc60e0e6 Evas GL: Use EGL image to share between Evas GL and GL backend
Summary:
When the context version between Evas GL and GL backend differs,
we cannot share texture between them.
So, when the driver has support for KHR_gl_texture_2D_image extension,
use EGL image to share between Evas GL and GL backend

Test Plan: Local Evas GL tests for 1.1, 2.0 and 3.0

Reviewers: jpeg

Subscribers: mythri, mer.kim, wonsik, cedric

Differential Revision: https://phab.enlightenment.org/D2115
2015-03-16 15:56:49 +09:00
mythri.venugopal 4d1a45627f Evas GL: Add support for Evas GL 3.0
Summary:
This should enable applications to use GLES 3.0 through evas gl.
Todo: Fix indirect rendering issue occuring because texture objects
cannot be shared between different version of GLES contexts.
Todo: extension pointers need to be updated for GLES 3.0

Reviewers: wonsik, spacegrapher, jpeg

Subscribers: cedric

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

@feature
2015-03-16 15:56:43 +09:00
Jean-Philippe Andre 29be7a36c7 Evas masking: Fix rendering of masks into invalid surfaces (GL)
In some rare cases, a mask would be rendered (from mask_subrender)
into a surface that is NOT an FBO. This would happen because the
previous surface was a "scaled GL image" and its size would
match the required geometry.

That took a while to figure out...
http://thecodinglove.com/post/111546429281/when-i-finally-solve-a-nasty-bug
2015-03-12 11:32:15 +09:00
Carsten Haitzler 1733d29922 evas - change error out from bitch to complain - cosmetic change 2015-03-11 21:59:01 +09:00
se.osadchy e58b135e31 evas: fix bug in the destructor of node in Evas_3D.
Summary: Bug relative with segmentation fault if node isn't mesh_node type.

@fix

Reviewers: cedric, raster, Hermet

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-06 20:19:22 +01:00
Jean-Philippe Andre bea9567d0e Evas GL: Kill runtime warnings caused by auto fallback
The previous commit modifies the concept of direct rendering
vs. indirect rendering, so some runtime checks (in debug mode
only) will fail.

This commit introduces two new engine functions:
 - gl_get_pixels_pre
 - gl_get_pixels_post

The latter will be used in a later patch for optimization.
2015-03-03 20:08:16 +09:00
Jean-Philippe Andre a14492ef73 Evas GL: Automatic fallback to indirect rendering when the scene has
not changed.

Automatically fallback to indirect rendering on FBO or X11 Pixmap
if the Evas Object Image is not marked as dirty. This should
improve the performance and/or power consumption in those
rare cases where this area of the canvas needs to be redrawn
but the GL content has not changed.

@feature
2015-03-03 18:11:32 +09:00
Dmytro Dadyka 731e6f469c [Evas: Evas_3D] Fix mesh API.
Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2075
2015-03-03 11:28:56 +09:00
Jean-Philippe Andre db0f9f4ccd Evas GL: Fix value of GL_COVERAGE_SAMPLES_NV
Use the Khronos version from extension EGL_NV_coverage_sample.
In the extension multisample_coverage version 4 (since 3/7/2013),
there is an explicite note about the name conflict.
2015-03-02 19:15:01 +09:00
Jean-Philippe Andre 2e3ee0e658 Evas masking: Fix double free() with scaled images
The function image_scaled_update() frees() the old scaled image
passed as input if it doesn't match the old dimensions. This commit
will avoid double frees.
2015-02-27 17:56:49 +09:00
Jean-Philippe Andre ab89dc401c Evas masking: Check fill properties to consider image as filled
Edje may not set the filled flag on an image even if its fill
properties make it fill the whole object. For masking, it can
then be considered as a filled image.
2015-02-27 15:57:36 +09:00
Jean-Philippe Andre 0d794e0b37 Evas masking: Skip GL fast path if image has fill options
If the image is not "filled", then we can't assume its image
source geometry is the same as its texture geometry.

Note: Implementing a fast path for non-filled images would
      require a hell of a lot more work (need to cut the render
      into a lot more triangles) for little real-life use.
2015-02-27 13:33:51 +09:00
Jean-Philippe Andre fab0d7f9d3 Evas masking: Simplify previous commit
Call object's function to get the private engine_data (here, the
image object). Thanks Dongyeon for your patch which inspired me to
do that instead of forcing pre_render.
2015-02-27 13:06:09 +09:00
Jean-Philippe Andre fddaf62fcc Evas masking: Add fast path for image-only masks in GL.
This will currently optimize most of the masks when using the
GL engine[1].

This is a very special case that adds a highly optimized path
for masking in GL. It works by creating a virtual image, containing
a pointer to the original image and a new geometry[2].

Instead of creating a new FBO-based surface (image_map_surface),
we refer to the original image and adjust the mask geometry on
the fly.

KNOWN BUGS:
- masking a map with such a scaled image is now broken.

[1] Right now all masks are simple Evas Object Image, so that means
    all cases of masking, except masks of masks, or masks of maps,
    will be optimized with this new method.

[2] This virtual image mechanism is still quite hackish and may
    be improved (for memory usage, refcounting, etc...)
2015-02-27 13:06:09 +09:00
Carsten Haitzler 6d5b2b32a0 evas scale sample - fix useage of eina thread queue
pass in ref not &ref (other uses were fine - this single one broken)
2015-02-27 10:35:01 +09:00
Jean-Philippe Andre 93d167ac87 Evas GL: Add hidden config values for direct rendering options
Those 2 new values are here to avoid using environment variables
that have side effects on the whole application.

I'm actually wondering if we shouldn't just kill off the env
vars altogether. Also, direct override is a terrible option that
should never be used.
Memory optimization can make sense (needs more testing tho).
2015-02-24 22:12:00 +09:00
Daniel Juyung Seo 9057f42453 evas: Add more notes about size_hint APIs.
Stop asking why size hint may or may not work on elementary widget.
2015-02-24 09:30:09 +09:00
Tom Hacohen 648ad2591c Fix code to conform to recent Eo changes. 2015-02-23 17:16:02 +00:00
se.osadchy cd4c0324ec evas: Evas_3D - add destructors for clean of memory.
Summary: Update and add new destructors.

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2029
2015-02-23 15:46:41 +01:00
Dmytro Dadyka 1b142d09d9 evas: Evas_3D - add parallax occlusion shading.
Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2018
2015-02-23 15:46:25 +01:00
Cedric BAIL 1af679dbd5 Revert "Revert "evas: refcounting initialisation and protect things.""
This reverts commit 789633b321.

Now this should be useful since we have refactored the shutdown logic of all engine.
2015-02-23 11:36:03 +01:00
Cedric BAIL 93333ede15 evas: refactor shutdown. 2015-02-23 11:35:29 +01:00
Dmytro Dadyka 095bab1723 evas: Evas_3D - fix bug with pack meshes data.
Reviewers: cedric

@fix

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-20 18:40:13 +01:00
Cedric BAIL 789633b321 Revert "evas: refcounting initialisation and protect things."
This reverts commit 216397bea6.

We do have some engine that are doing partial shutdown outside of the protected
function, leading to a crash.
2015-02-20 17:39:27 +01:00
Cedric BAIL 6bb4ecd65d evas: use two thread when scaling image.
This is for now just a small experiment. It was based on the experiment made
with OpenMP. I prefered to only use Eina here as we have already all the infrastructure
to do this nicely and simply. As a result I get a 65% speed improved on average for
the involved scaling operation. The secondary CPU is on my laptop running with a load of
75% percent. I don't have right now the time to do power consumption analysis, but I
think it shouldn't be to bad. I am also not throwing more core at this as we are not able
to use the second core at its max already, so additional core may result in a bigger
energy loss without enough gain.
2015-02-20 17:11:44 +01:00
Cedric BAIL 216397bea6 evas: refcounting initialisation and protect things. 2015-02-20 15:10:12 +01:00
Cedric BAIL 552a38cde5 evas: refactor software engine initialisation. 2015-02-20 15:04:52 +01:00
Boris Faure 0c5c1c97da evas gl: fix build when GL_COVERAGE_SAMPLES_NV is defined byg <GL/gl.h> 2015-02-19 22:52:50 +01:00
Cedric BAIL a083703e3d evas: more warning fix. 2015-02-18 22:42:48 +01:00
Oleksandr Shcherbina d28b82be45 evas: Evas_3D - callbacks for Evas 3D.
Summary:
Add class and type Evas_3D_Callback like wrapper under smart object
Incapsulate Evas_3D_Callback in Evas_3D_Object
Add virtual function register and unregister in Evas_3D_Object
Add function evas_3d_callback_call
Add callbacks clicked and collision for Evas_3D_Node

@feature

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

Subscribers: artem.popov, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-18 22:42:07 +01:00
Dmytro Dadyka 1c74a1afe2 evas: Evas_3D - refactor node shapes update mechanism.
Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-17 15:39:48 +01:00
Yomi 14e65920ff evas: fix misspellings in evas_render2.
Summary: fix misspellings of 'canvas' and 'work' in the comments.

Reviewers: raster

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-16 11:58:58 +01:00
Jean-Philippe Andre 681573c555 Evas: Fix compilation warning (-Wshadow) 2015-02-13 14:00:23 +09:00
Carsten Haitzler 5213599b5a evas 3d - undo async block code - 3d objects dont inherit from evas obj 2015-02-12 22:30:10 +09:00
Carsten Haitzler d3527da0ab evas - image obj - filled mode - never use invalid 0x0 fill
this fixes a lot of noise for filled image objects that set fill to
0x0 if objetc is 0x0. this clamps minimum fill at 1x1 and thus keeps
things silent and sensible. also just silently ignore 0x0 filled image
objects. noise is not that useful.
2015-02-12 22:30:10 +09:00
Carsten Haitzler 7c5f92d702 evas - render - have lock point to allow for async obj walk + update add
this adds a lock for when walking all the objects to generate render
commands for an async render. this allows even the object tree walk
plus update area caluclation to be moved off into async if every oject
that can change canvas state actually does so correctly. this change
adds all those lock block calls to synchronise with an async object
tree walk.
2015-02-12 11:06:40 +09:00
Oleksandr Shcherbina dc0b144cf0 evas: Evas_3D - mechanism for finding node by color pick.
Summary:
See first part https://phab.enlightenment.org/D1811 (backend, gl)

Add get/set for color pick mode at evas_3d_mesh and evas_3d_scene
Add evas_3d_node_color_node_mesh_collect function to collect data at force rendering
Add state flag for scene to avoid useless force rendering in case scene wasn't changed
Add functionality for color pick in evas_3d_scene_pick method

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-11 17:44:50 +01:00
kabeer khan 46b9b23144 evas: add image orient set/get API in software backend for now.
Summary:
Added API's to rotate(0, 90, 180, 270), flip(horizontal, vertical, transpose, transverse)
evas image object. Also added example to demonstrate this.

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: raster, stephenmhouston, cedric

Subscribers: stephenmhouston, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-11 17:30:54 +01:00
Dongyeon Kim c0d990c724 evas/software_x11: implement tbm native surface type
Summary:
This native surface type is based on the tbm surface used for the tizen platform.
For the software_x11 backend, image data is retrieved from tbm surface
and color format converted appropriately.
This will only work when libtbm.so is present in the system.
@feature

Test Plan: Local tests

Reviewers: raster, cedric, jpeg, Hermet

Subscribers: wonsik, cedric

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-02-10 14:48:53 +09:00
Dongyeon Kim defcc1f2ac evas/software_x11: implement native surface set for x11 type
Summary:
implement native surface set for EVAS_NATIVE_SURFACE_X11 type
on software_x11 backend.
@feature

Test Plan: local tests on PC

Reviewers: jpeg, cedric, raster, Hermet

Subscribers: wonsik, cedric

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-02-10 14:48:22 +09:00
Dongyeon Kim 72f3e684d9 evas/gl_x11: introduce tbm native surface type
Summary:
This native surface type is based on the tbm surface used for the tizen platform.
EGL_TIZEN_image_native_surface EGL extension is used to map
tbm surface to an egl image
@feature

Reviewers: raster, cedric, jpeg

Subscribers: cedric, wonsik

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-02-10 14:48:22 +09:00
Jean-Philippe Andre 7a50f5827f Evas render: Improve debug output with REND_DBG
Better formatting and less code clutter.

This is a purely non-functional change as all the
changed lines are ifdef'ed out by default.
2015-02-10 12:00:37 +09:00
Jean-Philippe Andre 888fc6e93f Evas masking: Fix potential issues with map & masking
These bugs have not been observed but the code logic did not
make sense.

@fix
2015-02-10 11:39:24 +09:00
Jean-Philippe Andre c394479afe Evas masking: Fix some garbage pixels with the SW engine
A rare case of garbage data would happen if smooth scaling
was called with a mask and 1:1 scaling. Use the proper
render_op to COPY for the first pass.

@fix
2015-02-10 11:39:24 +09:00
Oleksandr Shcherbina 00c2451656 evas: Evas_3D - ColorPick mechanism finding node and mesh in scene.
Summary:
Added additional texture and framebuffer for rendering meshes to it.
Added function that return OpenGL id additional texture
Added function that return color from target texture by mouse pick coordinates
Added function that render need meshes to target texture
Added engine wrappers for possibility force render to texture

@feature

Reviewers: Hermet, raster, cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-09 22:03:26 +01:00
Dmytro Dadyka d45d7d3f22 evas: Evas_3D - improve node tree update method.
Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-09 22:03:26 +01:00
Youngbok Shin 2d40315127 evas text: fix _ellipsis_get to return -1.0 on failure.
Summary:
When getting ellipsis value from evas text object fails,
the most reasonable return value is -1.0.
Currently, evas_object_text_ellipsis_get API with NULL returns 0.0.
It means ellipsis is not off. It must return -1.0 when API fails.
@fix

Comments by Tom: until now, this was inconsistent. With this change, it
now returns -1.0 consistently. Also, fixed commit summary.

Reviewers: woohyun, Hermet, seoz, tasn

Reviewed By: tasn

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1944
2015-02-09 17:31:35 +00:00
Oleksandr Shcherbina 8802ce2051 evas: Evas_3D - fix order of transformation while updating bounding object.
Summary:
The order of tranformation changed to scale, orientation, position as
in some cases it can lead to incorrect value for the bounding box.

@fix

Reviewers: cedric, Hermet, raster

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 15:37:15 +01:00
Oleksandr Shcherbina 0c4de0235c evas: Evas_3D - fix evas_3d_scene_pick when trying to get empty texcoords from mesh.
Summary:
During filling evas pick public data by API evas_3d_scene_pick
segfault can occur if mesh was created without texcoords.
See functions - _pick_data_mesh_add, _pick_data_texcoord_update

@fix

Reviewers: cedric, Hermet, raster

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 15:37:15 +01:00
Bogdan Devichev 36515241b9 evas: Evas_3D - fix when bounding sphere is large, situation with incorrect frustum calculation was possible.
Summary: When center of bounding sphere was out of frustum and number of intersections between bs and planes of frustum was more then 3, objects disappeared.
@fix

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 15:37:15 +01:00
Jean-Philippe Andre 69818e7c45 Evas masking: Fix another issue with masking
Fixes rendering in the following case:
- Object with a map has a mask
- Object is child of smart object which also has a map (eg. transit)
--> Masking did not apply to the children before this patch.

NOTE: This works fine in SW but still didn't work in GL, see the
      following commit...
2015-02-05 22:31:16 +09:00
Dmytro Dadyka dad7df18b8 evas: Evas_3D - fix bug with uninit Evas_Mat4 flag.
Reviewers: Hermet, raster, cedric

@fix

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 11:17:01 +01:00
Jean-Philippe Andre 9466f32dae Evas masking: Fix rendering of restacked masks of masks in a map
I know. This title does not explain anything. Whatever.

This fixes the following issue:
- Mask a genlist (big mask)
- Each item has an icon masked (small mask)
- Apply a map to the genlist
- Scrolling the genlist
--> The big mask still works but totally screws up the
    small icons with masks.

Note: Once again this patch only affects code paths where an
      object is a mask.
2015-02-04 15:03:41 +09:00
Jean-Philippe Andre a688ba45c8 Evas masking: Fix some remaining issues with animations
Yeah, mixing maps and masks of masks in a genlist leads
to tons of amazing bugs :)

This commit removes x,y from the "mask" field in an object,
as they are duplicates of cur->geometry.{x,y} but were not
properly kept in sync.

This patch fixes a situation of:
- A genlist in a map
- Each item has an icon masked
- Scrolling the genlist
--> The masked items would not render properly before this
    patch.

Remaining known problem:
- Mask a genlist (big mask)
- Each item has an icon masked (small mask)
- Apply a map to the genlist
- Scrolling the genlist
--> The big mask still works but totally screws up the
    small icons with masks.

Note: These changes look scary just before the release
      but I would have to backport them to 1.13.x as they
      definitely are bug fixes. Also, they only concern
      code paths used exclusively by masking.
2015-02-04 15:03:37 +09:00
Jean-Philippe Andre fbacbf7350 Evas masking: Fix masking of multiple objects in a map
All those masking bug fixes become harder to explain. But here goes:

 - Take a genlist, apply a mask to it (for example put everything
   in an elm_layout). Also play with various objects in the genlist.
 - Also apply a map to it (for instance, elm_transit zoom).

 --> Now some elements will be masked, some others will not,
     and some may even not render at all.

This patch restores a mask in the current drawing context, instead
of just unsetting it.
2015-02-04 12:48:10 +09:00
Jean-Philippe Andre 5fb43d3559 Evas masking: Forward previous mask where needed
In a situation where an object with mask of mask is in a map
(Yes! It can happen!) the masks would not get properly "multiplied".

Now the problem is that some objects still seem to bypass some
masks... Hmm...
2015-02-04 12:48:10 +09:00
Jean-Philippe Andre 89ee8e1446 Evas masking: Prevent drawing masks in the wrong surface
Masks should be actually rendered only to their specific target
surface.
2015-02-04 12:39:49 +09:00
Jean-Philippe Andre 5afa07bf6c Evas masking: Check only the variable we want to set
This is a left-over from a previous fix a few weeks ago.
The point of this "if" is just to avoid writing the COW value
if not needed.

For reference:
  commit f876cf31f8
  Author: Jean-Philippe Andre <jp.andre@samsung.com>
  Date:   Tue Dec 23 18:57:45 2014 +0900
    Evas masking: Fix invalid geometry after mask redraw
2015-02-03 11:12:20 +09:00
Amitesh Singh 0f32ab49ce evas callback: Fix typo in documentation of evas_object_event_callback_del_full
Reviewers: cedric, seoz

Subscribers: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D1904
2015-02-03 11:02:20 +09:00
Jean-Philippe Andre 5b4e0ece68 evas: fix some clipping issues before/after Evas_Map animations
Summary:
This is an attempt at fixing:
 - T1767: The ultimate evil map & clip bug

Force recalculation and re-propagation of clipper geometry
after or just before a map is applied (only when transiting
between map enabled and map disabled).

I realized that doing clip_unset+clip_set in the E widget
code would fix the issue, but this is not a solution that
makes a lot of sense.

Unfortunately I have no idea about the side effects of this
patch, especially in terms of performance.

Fixes T1767 and maybe T1630.

Test Plan:
Open PackageKit popup in E, check the animations
and that clipping works fine both during, before and after
the animations.

Reviewers: raster, cedric

Reviewed By: cedric

Subscribers: cedric, Hermet

Maniphest Tasks: T1767

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-01-28 09:28:39 +01:00
Stefan Schmidt 803daba423 evas: Add since tag for new evas_textblock_cursor_range_simple_geometry_get() API 2015-01-27 14:47:59 +01:00
Jean-Philippe Andre bd818f7eca Evas render: Remove useless code
While invesigating some clip & map issues, I found some very
strange piece of code:
{
  tmp = a;
  a = c;
  a = tmp;
}

This actually comes from a very old code refactoring where a
line in-between was removed:

   tobj = obj->cur.map_parent;
   obj->cur.map_parent = obj->cur.clipper->cur.map_parent;
 - evas_object_clip_recalc(obj);
   obj->cur.map_parent = tobj;

Adding this line back there doesn't seem to do anything anyways.
So, let's just remove useless code.

For the record (legacy evas):
  commit e1f6f3c5f239dfd95a307949acd5f98831c0c3c0
  Date:   Fri Aug 17 06:16:04 2012 +0000
  evas/render - code refactoring.
  SVN revision: 75351
2015-01-27 12:28:08 +09:00
Jean-Philippe Andre a376582b4f Evas masking: Fix masking of mapped sub-objects
Some complex examples of masking with mapped smart objects
would fail miserably, rendering the object without any mask,
and/or showing the mask itself somewhere in white color...
2015-01-26 19:25:36 +09:00
Jean-Philippe Andre 77feb96dd7 Evas masking: Fix rendering of masked objects with maps 2015-01-26 19:25:36 +09:00
ChunEon Park d85d9672b5 evas/map: make an internal function to static.
no need this function set external.
2015-01-23 22:52:25 +09:00
Jean-Philippe Andre 4c864f757a Evas masking: And another case of bad mask rendering
A masked object just can't be considered as opaque. As such,
it can't generate an obscure area. This fixes some super
rare rendering bug.
2015-01-23 17:24:51 +09:00
Jean-Philippe Andre 8b889f4892 Evas masking: Fix blending of some border images 2015-01-23 17:24:51 +09:00
Jean-Philippe Andre bc436ba95f Evas masking: Fix another memory leak
When the mask is hidden, free its surface.
This will fix leaks in, say, a genlist full of masked
objects.
2015-01-22 17:44:47 +09:00
Daniel Zaoui 87d523478b warning-- 2015-01-21 20:42:58 +02:00
Jean-Philippe Andre 15f7cefa68 Evas masking: Fix major memory leak
The memory usage graph was going up and to the right!
I was told this is always a good thing!

... maybe not this time :)

Hopefully I didn't forget a case. An intense session of
genlist scrolling with masks all over the place and masks
of masks didn't show any glitch, crash or memory leak.
2015-01-21 17:51:15 +09:00
Jean-Philippe Andre 0793dee86a Evas masking: Try to reduce memory footprint a little
Move some mask object pointers around to spare a few
bytes of memory.

Fixes T2025.
2015-01-21 17:38:22 +09:00
Cedric BAIL c25ba993f6 evas: reduce potential memory hole in Evas_Object_Protected_State.
The main difference between 1.12 and 1.13 memory foot print is actually
related to this two pointer to mask. I am wondering if there is not an
issue here also has we do have a duplicated pointer. We have prev_mask
and mask in both cur and prev state of an Evas_Object, but only mask
and prev_mask from the cur state seems to be accessed.

If we can remove two pointers from those state, we should have a decent
win in expedite benchmark. Hopefully 300KB to win there (Close to half
the additional cost in memory).
2015-01-20 18:46:08 +01:00
Cedric BAIL 201df16d67 evas: reorder structure to avoid structural hole. 2015-01-20 18:46:03 +01:00
Jean-Philippe Andre 6b81f4f220 Evas masking: Fix precise_is_inside for masked smart objects
The flag should be set on the mask itself.
Checking for (x,y) being inside the mask can be an expensive operation,
so further optimization will be required.
2015-01-16 12:09:58 +09:00
Chris Michael b6f74c0a12 evas: Fix unintentional integer overflow
Summary: This fixes CID1261436: unintentional integer overflow

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-01-09 15:26:32 -05:00
Jae Yong Hwang e561570507 evas:fix markup text length issue
Summary:
There was no conversion to the double quotation mark in the evas_textblock_text_utf8_to_markup function.
The price of the text coming out to API and text coming out to Textblock was different as a result.
As a result, Two text lengths came out differently.
So, I added the exceptional treatment part in the evas_textblock_text_utf8_to_markup function.

@fix

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1853
2015-01-08 19:38:49 +09:00
perepelits.m 694f9dbcdb [Evas, Edje] Adding of new structures
Summary:
There will be several methods to set orientation in edc, so we have decided to make one big vector,
the main reason is that we use quaternion by default, but look_at, for example, is given as 6 coordinates.

Reviewers: Hermet, cedric, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1693
2015-01-08 15:21:17 +09:00
Carsten Haitzler becd02aaa6 evas textgrid - fix drawing of codepoints that are 0
this fixes artifacts if you have cells with 0 codepoints and also have
underlines or strikethroughs in them.

@fix
2015-01-07 22:29:00 +09:00
Carsten Haitzler d5c3ad97e5 evas map aa - match previous fix.
this matches 83eb1aa3c2 fix in the other
map render func
2015-01-07 21:04:58 +09:00
Jean-Philippe Andre 267b8a5ead Evas map: Fix AA with opaque images
Well... actually this is not exactly a fix.
It just restores the previous behaviour, and allows AA to
work. As in, it won't draw ugly black lines but properly
blend to transparent.

But there is still a problem:

The image map render function changes the alpha flag on the source
image if AA is enabled or if the map has an alpha color. This is
actually wrong as images forcefully set to not have any alpha
(with evas_object_image_alpha_set(0)) will then not be opaque
anymore.

Right now I can't think of a solution (also I don't quite follow
the entire pipeline in evas map...). Changing the flag will
make some opaque areas transparent. Not changing the flag will
produce ugly artifacts where AA blending should happen. Fix one
bug and the other appears, and vice versa.

This can be tested with the example evas-map-aa and adding an
alpha channel to cube1.png (with gimp for instance) but manually
setting alpha to 0 in the code. Weird stuff will happen (try
playing with the map and pressing I to switch to/from image mode).
2015-01-07 20:21:16 +09:00
Jean-Philippe Andre 37f3d00a5c Evas map: Kill build warnings and don't set image flag
Don't change a source image alpha flag at render time.
It doesn't make sense at this point.

Also remove unused int pa.
2015-01-07 17:50:33 +09:00
Carsten Haitzler 83eb1aa3c2 evas map - new aa map has extra overflow with line list - fix it.
this fixes a feature added in this version of efl. as above.
2015-01-07 17:23:24 +09:00
Jean-Philippe Andre b601d89f45 Evas masking: Fix a potential issue with pixman
Untested. Just skip pixman path when there's a mask.
2015-01-07 16:48:39 +09:00
Jean-Philippe Andre f876cf31f8 Evas masking: Fix invalid geometry after mask redraw
The proper geometry should be set when rendering the mask,
otherwise we can't create a new surface if it changed dimensions.
2015-01-07 15:06:03 +09:00
Jean-Philippe Andre 592068108b Evas masking: Fix another set of rendering artifacts 2015-01-07 15:06:03 +09:00
Jean-Philippe Andre 4bff14676e Evas masking: Fix mask blend functions (SW engine)
The selected op func was not performing the correct operation,
thus producing rendering artifacts. These functions should not
be used anywhere except in case of masking... which was not an
available option earlier.

It was doing (wrong):
dst = interp(mask, src, dst)

Instead of (correct):
dst = dst + (1 - mask) * src

NOTE:
This commit also disables MMX, SSE3 & NEON implementations of
pixel_mask blend operations, since they are also broken.
2015-01-07 15:06:03 +09:00
Jaeun Choi 62f3170874 Evas masking: Implement support for map draw (SW) 2015-01-07 15:06:02 +09:00
Jaeun Choi 4eb3a58edd Evas masking: Implement support for polygon draw (SW) 2015-01-07 15:06:02 +09:00
Jaeun Choi 6747fadd9a Evas masking: Implement support for line draw (SW)
Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-01-07 15:06:02 +09:00
Jaeun Choi 6e8e5e89b5 Evas masking: Implement event masking support
In case the clipper is a mask object, we should use precise
event masking. By default precise_is_inside is not enabled
because it is expensive, but it should probably be set by
the application when they use masks as clippers.

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-01-07 15:06:02 +09:00
Jean-Philippe Andre 73919ea437 Evas masking: Implement mask support in evas_render
This implements supports for masking inside evas_render, which
means:
- Render the mask itself into a surface (ALPHA if possible)
- Pass this mask surface to the draw context
- Apply mask recursively in case a masked object is contained
  by another masked object.

@feature
2015-01-07 15:06:02 +09:00
Jean-Philippe Andre 2a0201d571 Evas masking: Allow setting an image object as clipper
The render function is not yet implemented, but this
prepares the infra used to set an object other than
Rectangle as a clipper.

@feature
2015-01-07 15:06:02 +09:00
Jean-Philippe Andre a9630a77b6 Evas masking: Add clip_image_[un]set functions to draw context
This allows passing a mask image to the render functions.

@feature
2015-01-07 15:06:02 +09:00
Jaeun Choi 9af60b1b04 Evas masking: Use alpha mask in SW engine draw functions
Work done by Jaeun Choi, rebased & squashed by jpeg.

This commit introduces changes to the low-level draw functions
of the SW engine considering the existence of an alpha mask image.

Features:
- Font masking (TEXT, TEXTBLOCK),
- Rectangle masking,
- Image masking (all image scaling functions should be handled).

The mask image itself is not yet set in the draw context (see
following commits).

@feature

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-01-07 15:06:02 +09:00
Dmytro Dadyka 38b3d5a857 [Evas: Evas_3D] Fixed bug with bounding shapes update.
Reviewers: cedric, Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1851
2015-01-07 12:58:51 +09:00
Jean-Philippe Andre a90876c337 Evas fonts: Fix minor deviation in RLE font render
So I've discovered some weird output values after drawing
some text. The destination alpha would become 0xFE even
when the back buffer had a background with 0xFF alpha.

Example:
Dest is 0xff00ff00 (green).
Color is 0xffffffff (white).
Current font alpha is 170 (0xaa).
--> Output was 0xFEaaFEaa instead of 0xFFaaFFaa.

This is because of some slightly invalid calculation
when doing the font masking (mtab[v] = 0x55 above).

Indeed, MUL_256 takes alpha values in the range [1-256]
and not [0-256] as was assumed.
2015-01-06 19:41:10 +09:00
Andy Williams ed7b41ce53 Make it clear in documentation that these methods are not implemented.
Even so return a more meaningful value - 0 is not a member of the Enum it returns.
2014-12-29 16:54:50 +00:00
Srivardhan Hebbar 28f0f7044a evas: fix memory leak issues in evas_object_textgrid.
Summary:
Calling eina_inarray_free to fix the memory leak issue in the error condition.

@fix

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-12-25 21:31:06 +01:00
Bogdan Devichev c471665ac8 evas: make Evas 3d mesh is inherited from Efl.File (functions file_set and save) 2014-12-23 21:20:21 +01:00
Bogdan Devichev ce36f8f5ad evas: better example of _mmap_set and resources for it are added. 2014-12-23 21:20:21 +01:00
Bogdan Devichev dd60525798 evas: a _mmap version of the file_set is added. 2014-12-23 21:20:21 +01:00
Bogdan Devichev 61aab62be0 evas: entry points to modules is Eina_File. Model_Common_Loader is deleted. 2014-12-23 21:20:20 +01:00
Bogdan Devichev 17baa3fa6f evas: entry points to modules is new struct with Eina_file, not const char *file. 2014-12-23 21:20:20 +01:00
Bogdan Devichev aaddf1a963 evas: Evas_3D_Mesh_File_Type sank into oblivion. Changing entry point to model_save_load. Changing API in examples. 2014-12-23 21:16:07 +01:00
Bogdan Devichev 02c85b9fe8 evas: add lib/evas/common/evas_model_<action>.c. Functions are renamed similar to functions in image_save_load process. 2014-12-23 21:14:52 +01:00
Bogdan Devichev 9b7e22f5a5 evas: replace and rename savers/loaders. 2014-12-23 21:14:30 +01:00
Bogdan Devichev 043055fc8e evas: preparation of places for model_saver_loader separated from image_saver_loader. 2014-12-23 21:13:43 +01:00
Carsten Haitzler a14e0b8b32 fix evas modules to never free eina module - fixes seg on shutdown in x
this fixes T1946
2014-12-23 15:11:18 +09:00
Carsten Haitzler 20ddb3929c evas - handle deleted objects in pointer in list in evas 2014-12-23 14:13:42 +09:00
ChunEon Park e9f94e8fdd evas/canvas: fix doc intentation. 2014-12-23 10:44:02 +09:00
ChunEon Park 8c72895351 evas/canvas: improve doc. 2014-12-23 10:40:30 +09:00
ChunEon Park 74ff95c349 evas/map: fix aa regression bug. 2014-12-19 21:52:06 +09:00
Carsten Haitzler afb7315722 Use NEON intrinsics for mapping instead of inline asm
Summary: Rewrite linline assembly in mapping func using NEON intrinsics.

Reviewers: raster

Differential Revision: https://phab.enlightenment.org/D1740
2014-12-17 15:28:50 +09:00
Tom Hacohen c970e787d6 Evas textblock: Remove redundant magic member.
We don't use magic since moving to Eo.
2014-12-15 14:58:32 +00:00
Jean-Philippe Andre 4cf2d75715 Evas GL: Fix direct rendering with client-side rotation
There was a problem when checking whether the current surface
is compatible with direct rendering. In case of client-side
rotation (it's a flag set on the surface by the app), a surface
can be directly rendered even if the rotation is not 0.

But, before this patch, it was assumed that the surface was
current. Which doesn't make sense because make_current is
called by the pixel callback, from the application, and this
happens *after* we check for direct rendering.

As a consequence, it was not possible to mix directly rendered
surfaces with FBO-based ones, and use client-side rotation.

This patch should solve that issue.
2014-12-10 10:52:22 +09:00
Jean-Philippe Andre 624787c42a Evas font: Improve RLE rounding alpha8 to alpha44
This should ensure that the difference between the original
pixel value and the rle4 encoded one is <= 8.

The previous fix was a bit stupid as it was not taking into
account the conversion a4 to a8 (which is a8 = (a4 << 4) | a4).
2014-12-09 11:02:01 +09:00
Jean-Philippe Andre 52d117c905 Evas font: Compress font algo should round instead of floor
This is an attempt at having higher quality font rendering
while still using RLE-based font compression.
2014-12-08 18:02:44 +09:00
Mun, Gwan-gyeong d1b8d52e0e evas/gl_drm: add native surface for wayland_egl_client.
Reviewers: zmike, devilhorns, cedric, gwanglim

Reviewed By: cedric, gwanglim

Subscribers: jpeg, torori, cedric

Differential Revision: https://phab.enlightenment.org/D1507
2014-12-04 17:59:30 +09:00
Jean-Philippe Andre ef36e0d887 Evas GL: Clarify doc about Evas_GL_API struct version 2014-12-03 16:57:50 +09:00
Gwanglim Lee 5ccf585e15 Evas GL: Update evas gl api version number to 3
evas gl api supports wayland extensions as being part of a struct
of version 3.
2014-12-03 11:48:03 +09:00
Gwanglim Lee 9eefb3ea89 Evas GL: Add support for bind_wayland_display extension
This provides EGL_WL_bind_wayland_display EGL extension to bind
and unbind the wl_display of a wayland server to an EGLDisplay.

@feature
2014-12-02 22:45:36 +09:00
Tom Hacohen 95f89f6e2e Evas textblock: Fix possibly null dereference.
Thanks to kimcinoo for reporting.

@fix
2014-12-01 11:55:08 +00:00
Dmytro Dadyka 6762af0beb evas: Evas_3D - add mesh blending mode.
Reviewers: Hermet, raster, cedric

Subscribers: Oleksander, cedric

@feature

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-12-01 08:09:29 +01:00
Oleksandr Shcherbina 54c1667d4e evas: Evas_3D - add bounding sphere, revision frustum culling
Summary:
Move check visibility of node from evas_3d_node to evas_3d_camera
Move functionality (normalize, check distance, calculate frustum)
in evas_3d_utils.h (we are planing use evas_is_sphere_in_frustum in evas_gl_3d.c -
don't render mesh if it non visible)
Add possibility check frustum by box, aabb, central point
Refactor example frustum culling

@feature

Reviewers: Hermet, raster, cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-12-01 06:26:32 +01:00
Carsten Haitzler ac7d7c9cbe Use intrinsics for scaling up instead of inline asm
Summary: Rewrite linline assembly in scaling func using NEON intrinsics.

Reviewers: raster

Differential Revision: https://phab.enlightenment.org/D1666
2014-11-29 15:50:03 +09:00