Commit Graph

229 Commits

Author SHA1 Message Date
Jean-Philippe Andre b0a32b0bd0 Efl: Rename Efl.Pointer.Event into Efl.Event.Pointer
Also renames two types: Efl.Pointer.Flags and Efl.Event.Flags
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre ea8c6e5632 Evas: Extend pointer events and add legacy conversion routines
To be honest, this commit is a bit of a mess since it's a
rebased version of some temporary work patches.
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre ce5688a388 Evas: EO-ify Evas_Device and partly move to Efl
So, this is not a very clean solution, but this mostly
makes Evas_Device an Eo object of class Efl.Input.Device.
Since evas_device relies on some Evas knowledge (evas
callbacks, canvas private data), it can't be fully moved
to lib/efl/.

Making the input device an interface rather than a class
was also not a great solution, as the goal is to share
the data structure around EFL internals (Ecore and Evas).
2016-05-31 19:03:04 +09:00
Cedric BAIL ddf92ba61b evas: let's reuse what we know when possible to avoid more useless eo_data_scope_get. 2016-05-06 17:01:10 -07:00
Cedric BAIL 4bf54d993f evas: cache result of eo_data_scope_get that are heavily used.
This alone save a good 3% time to our first frame being displayed.
2016-05-06 16:47:07 -07:00
Mike Blumenkrantz 0231800b60 evas: add internal functions for unsetting+regenerating image data
in the event that the global gl context changes, all engine image data
must be destroyed and then re-created in order to continue rendering
successfully
2016-05-05 10:49:31 -04:00
Oleksandr Shcherbina 172cfa0f04 evas.canvas3d: Change shade_mode to shader_mode
Summary:
enum Evas.Canvas3D.Shade_Mode are using for choose relevant shader source code.
So renaming have a sence.
Rename evas_canvas3d_shade_mode_set/get property to evas_canvas3d_shader_mode_set/get
Rename internal fields and functions

Reviewers: cedric, Hermet, raster

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3882
2016-04-14 20:28:20 +09:00
Oleksandr Shcherbina 1f66a9e731 evas.canvas3d: Add FXAA post processing render.
Summary:
Add post processing render function as rendering full screen quard after
rendering to texture.
Add possibility use size of current frame in shader.
Add FXAA shader source files

Reviewers: raster, cedric, Hermet

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3847
2016-04-12 00:50:46 +09:00
Jean-Philippe Andre cb93c26db7 Evas proxy: Implement buffer map/unmap 2016-03-28 16:40:02 +09:00
Jean-Philippe Andre 22353e31e1 Efl.Canvas.Image: Remove object data for maps
The engine is responsible for the complete tracking of
maps.

Also, make buffer_unmap return bool.
2016-03-28 16:40:02 +09:00
Jean-Philippe Andre 488854af2b Efl.Gfx.Buffer: Switch to void* data and signed ints
1. unsigned char* as a return type was not even compatible
   with the default colorspace (ARGB: 32 bits).

2. Change all unsigned to int for... uh... simplicity
   unsigned is more correct than int for things like width,
   size or stride, but in fact having both ints (x,y) and unsigned
   ints makes the code more complex.
   This is a matter of personal taste.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 39a970835b Evas: Remove unimplemented border_set/get (engine internal) 2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 28a03d6e19 Evas: Remove unimplemented image comment (internal)
This is a minor cleanup of RGBA_Image.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 326ff9ae82 Efl.Canvas.Image: Implement support for map/unmap
Now the real hard work is to actually implement support inside
the engines: SW and GL generic.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 91e0bdb1e7 Evas: Simplify direct access to image data
This should avoid issues with image_data_get from the engines,
when we really just want to fetch the original data pointer.
2016-03-28 16:40:01 +09:00
Cedric BAIL fd80e26f06 evas: make no longer supported object, legacy only.
So I forgot to clean my hard drive from previously generated files,
and obviously everything still worked. This lead to having to roll back
evas_smart_clipped.eo as a public eo object until we merge elementary.

Still I would like someone to take a look at elm_pan.eo and figure out
how to not rely on smart clipped there.
2016-03-21 16:31:26 -07:00
Cedric Bail 11887c62a2 evas: include Eet.h as we do export a function using Eet_Data_Descriptor.
This was spotted by Nicolas Aguirre while building on Yocto which has
more agressive build option and warning.
2016-03-18 10:23:38 -07:00
Jean-Philippe Andre edafd4ec34 Evas: Improve EVAS_OBJECT_LEGACY_API a bit more
This now calls EINA_SAFETY_ERROR which makes it easy to then
break inside _eina_legacy_error.
2016-03-17 13:10:35 +09:00
Oleksandr Shcherbina 296e8c22b0 evas.canvas3d: support static LOD technic
Summary:
Main flow: add several meshes(with different number of polygons) in one node,
enable LOD for node, set boundary distances to choose need mesh depend on distance
to the camera node, render only need mesh. Add API's enable lod in
evas_canvas3d_node module and set boundary distance to module
evas_canvas3d_mesh module Refactored function evas_canvas3d_node_mesh_collect
to calculate distance. Refactored _scene_render to have possibility pass to the
render only need LOD mesh.

Reviewers: cedric, Hermet, raster

Subscribers: jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-03-15 12:49:39 -07:00
Jean-Philippe Andre b7e0eec089 Evas.Image: Fix legacy proxy API 2016-03-15 11:11:59 +09:00
Jean-Philippe Andre 20b4d9dd6a Evas engines: Add internal functions for native images
- image_native_init
- image_native_shutdown

init() will be used to test whether the engine supports a
certain type of native image.

Note: Native image support is very much dependent on the engine,
and some stuff like opengl should work everywhere (even in sw
with osmesa) but that's not the case.
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 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
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
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
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 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
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 e8134e868a evas: make evas object an animator provider. 2016-02-02 10:47:01 -08: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
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
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 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 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
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
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
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
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
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
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
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
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
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
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 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 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
Carsten Haitzler 15b9ac2d25 evas - lock render updates as this happesn to be accesed from threads 2015-09-28 02:58:54 +09:00
Oleksandr Shcherbina 28d69200f9 evas_canvas3d: sets for shadow rendering
Summary:
Add possibility change quality and offsets for shadow.
Add mesh API's to sets size, step and bias constant.
Add scene API to sets depth values.

Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-21 23:41:29 +02:00
Subhransu Mohanty 291c3e32af evas: create ector surface per engine instance.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-21 22:50:34 +02:00
Jean-Philippe Andre 00cf9e2fc5 Evas: Move REND_DBG to evas_render.c
Unlike what the comment claimed, it is not being used anywhere outside
this file.
2015-09-04 15:13:35 +09:00