Commit Graph

393 Commits

Author SHA1 Message Date
Jean-Philippe Andre 9f5d279722 Evas events: Implement support for hold event 2016-06-27 16:38:46 +09:00
Jean-Philippe Andre 7bf8da2baa evas: Rename Evas.Object to Efl.Canvas.Object
One step closer to make the EO inheritance tree look like
it's all Efl.
2016-06-21 14:35:19 +09:00
Jean-Philippe Andre 52f9220b3f Evas: Rename smart object into Efl.Canvas.Group 2016-06-17 19:32:43 +09:00
Jean-Philippe Andre 42b63f5507 Evas: Add smart_ prefix to all smart functions (eo)
This is a first step at separating legacy smart
object features away from standard efl interfaces.
2016-06-17 19:25:48 +09:00
Jean-Philippe Andre b88ca02fe9 Evas: Move smart_get to legacy and smart_attach to internals
smart_get and attach referred to an opaque struct, from EO
point of view.

Also, attach was an EO-only function, used nowhere besides
evas object smart itself, and evas grid (which is not EO
public API).
2016-06-17 19:25:47 +09:00
Jean-Philippe Andre 93fad2a19f Evas: Nove smart data get to smart class
It didn't make sense where it was.
No idea why evas_box was overwriting smart_data.get
(esp. since it was returning a private struct).
2016-06-17 11:37:39 +09:00
Jean-Philippe Andre ab4e15e9c3 Evas: Move object static_clip to legacy
This is a horrible API used for internal optimizations. Which
may or may not be partly broken anyway.

We can do better, in the future. Let's not expose this kind
of API.
2016-06-17 11:37:39 +09:00
Jean-Philippe Andre d4b96d33d6 Evas: Mark type as legacy and protected
Only set() is allowed for EO, and it's a constructor,
protected function. Unfortunately, this means a lot
of #define EVAS_OBJECT_PROTECTED
2016-06-17 11:37:39 +09:00
Jean-Philippe Andre 70a358357a widget: Switch to pointer & key events
Unfortunately, since all widgets rely on the legacy evas
event structs, I had to add a translation mechanism.
2016-06-14 16:27:42 +09:00
Jean-Philippe Andre 44f445fe76 Efl: Introduce app-side min size hint
Now called "hint_min", not sure if it's the proper name for it.
At first I wanted to reuse the request size hint instead of
adding a new hint, but doing that would break Terminology
or any app that already used size_hint_request.

One problem with hint_request is that the legacy function
already exists but its support is practically not implemented.

@feature
2016-06-09 16:36:04 +09:00
Oleksandr Shcherbina 7e0601c980 evas: Get pixels from rendered 3D scene
Summary:
Implemented interface Efl.Gfx.Buffer functions bufer_map/unmap for Efl.Canvas3D.Scene.
Added function e3d_drawable_texture_rendered_pixels_get to module evas_gl_3d
to getting pixels from FBO. Added wrappers for functions
e3d_drawable_texture_rendered_pixels_get and e3d_drawable_texture_id_get
to have possibility call it through engine functions.

Reviewers: cedric, Hermet, raster, jpeg

Reviewed By: jpeg

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3978
2016-06-03 14:22:33 +03:00
Jean-Philippe Andre 0505a729e2 Evas: Simplify eo event mechanism
So, I was stupid. I was relying on legacy callbacks to
trigger eo events, which means that only when a legacy
callback was registered would my new eo events be triggered.

Instead, I can pass the eo event desc & info whenever
calling evas_object_event_callback_call().
2016-06-02 14:19:18 +09:00
Jean-Philippe Andre 350b465d22 Evas: Send Efl_Event_Key data to evas objects 2016-06-02 13:31:40 +09:00
JEONGHYUN YUN 26b2e73d56 evas : evas_object_key_grab exclusive option logic is changed.
Summary:
 - added is_active property in Evas_Key_Grab.
 - Evas key down and key up events transferred to active grabs only.
 - If evas grabs has a exclusive grab, other grabs will be deactivated.
 - If a exclusive grab is ungrabbed, remained grabs will be activated.

Reviewers: jypark

Reviewed By: jypark

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3996
2016-06-01 17:14:13 +08:30
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
Jean-Philippe Andre ef0ec6bed3 evas_render: Fix some clipping issues inside proxy
Inside a proxy, clipping information might be wrong since the
source object may be at a different position than within
the proxy. If source_clip is not set, then we need to discard
all clips that are outside the proxy context.

So we just propagate the clip information inside the current
draw context, and even recurse from clipper to clipper to
find the final state of clipping.

Map and proxies and others (who said masks?) should definitely
rely more on the same model.

This code is not a mess. At all. You gotta love evas_render.
2015-09-04 11:11:58 +09:00
Jean-Philippe Andre 69cbbc2184 evas: Add internal context_dup function
This will simplify some code related to clipping and masking.
2015-09-04 11:11:39 +09:00
Jean-Philippe Andre d69f9e0b84 Evas masking: Fix potential invalid access to mask image
After clip_image_get, the old mask may be replaced by a new one,
and unref'ed, but it is later on set back as the context mask image.
Maybe it's possible that there was 0 reference and the image
got freed in between.

No idea how to test this.

@fix
2015-09-04 11:11:39 +09:00
Cedric BAIL 033658d1ca evas: implementation of snapshot feature.
This should theorically work, need some test. Design is easy to understand. Render
every part of a snapshot object by rendering the content below it, before rendering
the stack above it using that object content.
2015-08-05 15:12:33 +02:00
Cedric BAIL 2ebf315591 evas: add a snapshot bool to Evas_Object_Image.
Snapshot object are rendering the content of the canvas below them into them.
They can then be used for filter, map or proxy.

Have fun !
2015-08-05 15:12:33 +02:00
Jean-Philippe Andre c45ae022c8 Evas masking: Fix crash in async rendering
There was a FIXME comment... >_<

Improper management of image resources in async render led to
a rare crash. This should fix that.

@fix
2015-07-27 14:15:09 +09:00
Jean-Philippe Andre 8942c0c29b Evas GL: Fix sync, wlbuffer and image egl ext functions
Before this patch, those EGL/EvasGL functions can not work
without a current context. But EGL does not require any
current context for those to work, or at least, this should
be left to the driver to decide.

Evas GL was only able to get a pointer to the display
if a context was current.

The display pointer should be infered from Evas_GL unless
we can find a current display. EGL does not require a
context to be current in most of these function calls.

This should bring evasgl a little bit closer to EGL in terms
of behaviour (those are EGL-only extensions, btw).

Thanks @spacegrapher for the quick review

@fix
2015-07-17 14:47:42 +09:00
Jean-Philippe Andre b439fafa17 Evas GL: Fix internal function pointer
evas_gl_native_context_get is an internal function
passed around from an evas engine to evas_gl so that we can
implement evasglCreateImageForContext without exposing
any evas engine internal structure to evas_gl.

It's all a ittle bit ugly but the previous solution with
dlsym(DEFAULT) didn't work.
2015-07-16 19:50:38 +09:00
Jean-Philippe Andre b5c9350805 Evas: Replace image_map_surface_free by common image_free
Those two functions were doing exactly the same thing[1], which
is free an image, so this commit only attempts to simplify the code
a little bit.

[1] Actually image_map_surface_free() might even not have worked
properly with cserve2 sw (calling unload instead of close).
2015-07-02 12:05:50 +09:00
Jean-Philippe Andre fd4e133cc1 Evas: Implement image_data_get for FBO images 2015-07-02 11:58:50 +09:00
Daniel Kolesa c709f1dca2 eolian/generator: constify all prototypes for @const functions
Otherwise there would be conflicts in certain circumstances.

This also requires adding const on many existing functions,
and similar work is necessary in Elementary.

@fix
2015-06-25 12:18:43 +01:00
Jean-Philippe Andre d15308efef Evas filters: Add explicit exec flag in data_set
This flag should be set iif the string passed is to be executed
rather than assigned. This is used to pass complex arguments
as data, like tables (eg. color class).
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre 0e8f890dfb Edje & evas filters: Add extra data from EDC to Lua program
This also supports color classes (really rough implementation for
now, but the API should remain stable).

@feature
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre 84e3dd5c34 Evas filters: Add name to the filters
Deep down internally there was already a name, but no API could
really set it properly.
Here Edje will set the name of the filter based on the part name
or the data item name if relevant.
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre 64fd278c62 Evas filters: EO-ify the filters API
This creates the new interface
 Efl.Gfx.Filter

And the implementation is a mixin (evas_filter_mixin.c):
 Evas.Filter

All the filter rendering code has now been moved to this
new file. TODO: Merge image filtering.
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre f3e16bc485 Evas filters: Implement Lua classes for colors & buffer
Reuse previous code for buffer. Keeps API stability.

The new class "color" is here for a more convenient color
representation. This way, colors can be represented in more
natural ways like: {r,g,b[,a]}, 0xaarrggbb, "red", "#rrggbb"

Class color is implemented in pure Lua, and adds a .lua file
to Evas' share folder.
2015-06-25 14:36:08 +09:00
Jean-Philippe Andre 93797e3b0d Evas filters: Create specific log domain
This will improve the debug output of evas and specifically
allow setting "evas_filter" log level to a higher or lower
value depending on what you are debugging :)
2015-06-25 14:36:08 +09:00
Jean-Philippe Andre 225c0f937a Evas filters: Pass edje state name & value to the filters
From Edje, pass the current state info (name and value) as well
as the next state and the transition position when applicable.
2015-06-25 14:36:08 +09:00
Oleksandr Shcherbina d409df1caa evas: change interface evas_3d to evas_canvas3d
Summary:
Regard to https://phab.enlightenment.org/T2479 it is need for right generation
Eolian files

Reviewers: cedric

Subscribers: cedric, tasn

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-17 17:52:17 +02:00
Jean-Philippe Andre 111e51a6ff Evas: Add "no-render" flag for proxy sources & clippers
Those objects should never be rendered on the canvas, even if they
are visible. On the other hand, they need to be rendered in mask or
proxy surfaces.

note: this patch includes some extra whitespaces changes :(

@feature
2015-06-15 16:59:41 +09:00
Carsten Haitzler 25983dcedd evas render2 work - begin to make rectangles deal with render 2 basic
infra
2015-06-09 17:34:39 +09:00
Ivan Furs a88aebe8cc evas: for aabb add interpolation frame when base frame is not found
Summary:
Old algorithm searched specified frame of the base frame and when it could not find the specified frame it ignored. So the bounding box was not synchronized with the object.
New algorithm always returns specified base frame or frame interpolation between the nearest base frames. That does synchronizes mesh object and his bounding box.

Reviewers: Hermet, cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-03 17:14:12 +02:00
se.osadchy 684c51360f evas: fix color pick compatibility of Evas_3D with GLES.
Summary:
Use fourth component texture. Update mechanism generation pixels, scene renderer
to texture and geting color pixels from texture. Update shader for color pick.

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: Oleksander, cedric

Differential Revision: https://phab.enlightenment.org/D2549
2015-05-27 00:31:07 +02:00
Bogdan Devichev 6dac83e643 evas: add API for creation Evas_3D node primitives.
Summary: Now mechanism of creation of primitives is similar to model loading.

Reviewers: Oleksander, Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-27 00:31:07 +02:00
Cedric BAIL 71b7fc982a evas: remove the need to order the header correctly for Windows. 2015-05-07 09:53:10 +02:00
Oleksandr Shcherbina d88ccf06a5 evas: use Evas_GL_image for generate texture unit for Evas_3D_Texture.
Summary:
Used engine function for load image/data and use texture unit through
Evas_GL_Image object
Used Evas_ColorSpace format instead Evas_3D_Color/Pixel format
Added transformation matrix for adjusting texture unit coordinates in shader
Added property in Evas_3D_Texture for mark possibility get texture without atlas
(see https://phab.enlightenment.org/conpherence/54/, I suppose it will done
after this patch)

Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:09 +02:00
Jean-Philippe Andre 5e832dfa76 Evas GL: Disable direct rendering if there is a map
The engine itself (gl_generic) will detect whether the target
surface (canvas where to draw the gl stuff) is the window
backbuffer or not.
2015-04-14 21:19:13 +09:00
Bogdan Devichev f8f118f058 evas-3d: T2226 (Evas Eet saver does out of range access) fixed.
Summary:
texcoord now is 2D vector

@fix

Reviewers: cedric, Hermet, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2233
2015-04-06 14:13:30 +09:00
Oleksandr Shcherbina bc8dfbb1ef [evas/evas_3D] Billboard mechanism
Summary:
Add pointer to target billboard node in Evas_3D_Node
Skip set flags change orientation for billboard node
Add method node_billboard_update to use it for change orientation during traverse
by nodes
Split API evas_3d_node_look_at_set to have possibility change orientation of node
without set flags

Reviewers: cedric, Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2245
2015-04-06 14:10:28 +09:00
Cedric BAIL b18b1e89ff evas: fix Windows build. 2015-04-03 16:34:22 +02:00
Cedric BAIL de08a3bc04 ector: add reference point to define (0, 0) and don't repeat the same value everywhere. 2015-04-03 16:33:19 +02:00
Cedric BAIL dd1cae7329 evas: initial implementation of a dumb SVG parser.
This commit is experimental and may be rebased until usable.
2015-04-03 16:30:56 +02:00
Cedric BAIL f2380b0920 evas: introduce begin and end operation on an Ector surface.
This is necessary for GL has you want to map once and run with it, but it
will also help the software backend to not remap the surface all the time !
2015-04-03 16:30:44 +02:00
Cedric BAIL c2e75544e1 efl: move mmap API to be part of Efl_File class. 2015-04-03 16:23:13 +02:00
Cedric BAIL b6ffe1cc87 evas: first implementation of an ector drawer inside Evas software engine.
Note: this won't work with the OpenGL backend.
2015-04-03 16:22:18 +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
Carsten Haitzler 2347c6ff01 evas render2 - restructure it to be an explicit api call - cleaner to do 2015-03-20 18:03:54 +09: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
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
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
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
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
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
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
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
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
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
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 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
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
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
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
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
Jaehyun Cho 30623aea9e evas_object_main: Keep map effect after evas object move
Summary:
Keep map effect after evas object move
@feature

Reviewers: raster, cedric, Hermet

Subscribers: raster, cedric

Differential Revision: https://phab.enlightenment.org/D1678
2014-11-28 13:18:16 +09:00
Jason Gerecke 26c943bac0 Expose device (e.g. pen) axis information to applications
Summary:
This patch set adds the necessary code to expose device axis state to applications. This was primarily written with graphics tablets in mind, which -- in addition to acting like a mouse -- also provide information about pen pressure, tilt, etc. Other devices could potentially benefit from this API as well: touchscreens, joysticks, knob controllers, "spaceballs", etc.

Whenever an update to the device state is recieved, an "Axis update" event is synthesized. This event contains the updated information, typically scaled and normalized to a particular logical range (e.g. zero to one for pressure, -pi to pi radians for angles, etc.). Information about the tool which generated the event is also stored so that applications can disambiguate events from multiple devices (or in the case of multitouch screens, individual fingers).

This API is only wired up for use with X11 at the moment. Support for other backends (e.g. Wayland) should be easy to add for those familiar them.

**Note**: The following is a list of changes from the "v2" patches originally sent to the mailinglist

//Define and implement new Ecore_Event_Axis_Update events//
 * Harcode axis labels instead of including xserver-properties.h
 * Use C89-style comments
 * Use doxygen comments
 * Update comment text to note axes with unbounded/undefined ranges/units
 * Create "Ecore_Axis" and "Ecore_Axis_Label" typedefs
 * Reference typedef'd instead of raw types
 * Adjust how we count through valuators to support tilt/az
 * Add support for tilt and azimuth
 * Tweak memory management in case number of valuators differ
 * Expand TWIST axis normalization to declared range
 * Only normalize TWIST axis if resolution == 1 (wacom bug)
 * Cache label atoms on first use to minimize round-trips

//Implement EVAS_CALLBACK_AXIS_UPDATE event and friends//
 * Update to doxygen comments
 * Update comment text to note axes with unbounded/undefined ranges/units
 * Typedef 'Evas_Axis_Label', 'Evas_Axis'
 * Move typedef for 'Evas_Event_Axis_Update'
 * Reference typedef'd instead of raw types

//Wire the Ecore and Evas implementations of axis update events together//
 * Expose ecore_event_evas_axis_update in Ecore_Input_Evas.h
 * Move ecore_event_evas_axis_update to more logical position

//DEBUG: Add axis update logging to evas-multi-touch.c//
 * Removed from patch set

//Make evas-multi-touch demo use new axis functionality//
 * Have pressure adjust rectangle brightness instead of size
 * Use more available axis data when rendering rectangle (azimuth, tilt, twist)

Test Plan: The evas-multi-touch demo was updated to support axis update events. A graphics tablet was then used to verify that the pressure, azimuth, tilt, and twist data was coming through correctly.

Reviewers: cedric, raster

Subscribers: cedric

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

Conflicts:
	src/lib/ecore_input/Ecore_Input.h

Carsten Haitzler -

** fixed forward enum typedefs (make things unhappy)
** fixed conflict above
** fixed wrong param type for _evas_canvas_event_feed_axis_update()
** fixed @sinces to be 1.13
** fixed formatting/indeting
** fixed order of operation reliance in if's with ()'s to be clear
** fixed functions to be static that should have been
2014-11-25 12:43:15 +09:00
Bogdan Devichev d896dfb342 evas: Evas_3D - add .ply export/import.
Summary:
.ply format is important for relation blender and EFl, because in blender exist only two mesh export API: bpy.ops.import_mesh.ply and bpy.ops.import_mesh.stl. One of them is necessary for .edc 3D generator. Which I writing now.
Sorry, it isn't like image loader. Refactoring of import/export will be soon.

Reviewers: Oleksander, artem.popov, Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-11-14 07:11:15 +01:00
Jean-Philippe Andre a56cc8a8c1 Evas: Avoid creating an extra context for proxy rendering 2014-11-12 19:18:09 +09:00
Jean-Philippe Andre fe677a0518 Evas: Use common function for proxy_subrender
Merges functions from:
- filters
- image object
2014-11-12 17:11:49 +09:00
Jean-Philippe Andre 4fb138a65f Evas: Remove ugly REND_DBG
Here's a macro that's used for debugging in some of the ugliest
ways possible: avoid passing an extra argument to a function when the
cost of always passing it is negligible (it's an int).

Fixes T1749.
2014-11-12 15:26:59 +09:00
Jean-Philippe Andre 251389fefd Evas filters: Fix COW usage.
Thanks cedric for the report.
We'll need a new function (after 1.12) to detect if the current
cow pointer is the default data or not. Maybe eina_cow_default_get()
or maybe something just returning a bool.
2014-10-29 15:12:53 +09:00
Jean-Philippe Andre 5a9d8d6f03 Evas GL: string_query returns a const char *
Why cast to/from void* in the first place?
2014-10-27 16:12:38 +09:00
Jean-Philippe Andre 7db01ea396 Evas filters: Remove useless source_count and cow checks 2014-10-22 14:27:50 +09:00
Jean-Philippe Andre 6935880171 Evas filters: Move filter COW to evas global stuff
It will be shared between TEXT and IMAGE objects.
2014-10-22 11:14:09 +09:00
Jean-Philippe Andre 4315537820 Evas GL: Add support for OpenGL-ES 1.1 (part 2)
Add version param to context_create.
Add support for 1.1 contexts in the GL_X11 engine, and checks
for version in all other engines (return NULL).
Add API wrappers for all OpenGL-ES 1.1 APIs (normal and debug
modes).
2014-10-20 12:16:08 +09:00
Jean-Philippe Andre a0712e25e1 Evas GL: Add support for pbuffer surfaces
Supports only EGL for now :(

These pbuffer surfaces can be used to create dummy surfaces for
make_current and render threads.

@feature
2014-10-20 12:16:08 +09:00
Jean-Philippe Andre 29e7f54ea0 Evas GL: Add evas_gl_surface_query
When using EGL, this function should return the properties of
a surface. Limited to a subset of known attributes.

Right now, this function will only work fine with EGL.
GLX support or any other engine is not implemented.

@feature
2014-10-20 12:16:08 +09:00
Jean-Philippe Andre de7a8a3dab Evas GL: Add API evas_gl_rotation_get
This will be used to increase the chances of having direct
rendering (no fallback to FBO) even if the window is rotated.

The client is then responsible for handling the view rotation.

@feature
2014-10-20 12:16:07 +09:00
Jean-Philippe Andre cb5e88d20f Evas GL: Add APIs to get current surface/context
- evas_gl_current_surface_get
- evas_gl_current_context_get

@feature
2014-10-20 12:16:07 +09:00
Jean-Philippe Andre 8d6f873354 Evas GL: Add API evas_gl_error_get()
Similar in meaning to eglGetError()

@feature
2014-10-20 12:16:06 +09:00
Bogdan Devichev 1f9ace657b evas: fix warnings introduced by Evas_3D eet import/export feature.
Summary:
This is a fix of those warnings. Sorry for existence of them.
   CC       lib/evas/common/lib_evas_libevas_la-evas_alpha_main.lo
../../src/lib/evas/canvas/evas_3d_mesh_loader_eet.c:113:13: warning:
assignment from incompatible pointer type
     eet_file = _evas_3d_eet_file_new();
              ^
   CC       lib/evas/common/lib_evas_libevas_la-evas_blend_main.lo
   CC       lib/evas/common/lib_evas_libevas_la-evas_blit_main.lo
   CC       lib/evas/common/lib_evas_libevas_la-evas_convert_color.lo
../../src/lib/evas/canvas/evas_3d_mesh_saver_eet.c: In function
'evas_3d_mesh_save_eet':
../../src/lib/evas/canvas/evas_3d_mesh_saver_eet.c:159:13: warning:
assignment from incompatible pointer type
     eet_file = _evas_3d_eet_file_new();
              ^
   CC       lib/evas/common/lib_evas_libevas_la-evas_convert_colorspace.lo
   CC       lib/evas/common/lib_evas_libevas_la-evas_convert_gry_1.lo
../../src/lib/evas/canvas/evas_3d_eet.c: In function
'_evas_3d_eet_file_new':
../../src/lib/evas/canvas/evas_3d_eet.c:28:4: warning: return discards
'const' qualifier from pointer target type
     return creating_file;

Reviewers: cedric, artem.popov

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-10-08 18:48:42 +02:00
Jean-Philippe Andre fe2dcfb895 Evas: Remove unused array calculate_objects 2014-10-08 15:52:39 +09:00
Stefan Schmidt 5f2863cf87 evas/3d: Add declaration for new mesh functions.
They are used in other files but have never been declared.
2014-10-07 09:33:51 +02:00
Bogdan Devichev 5d004c80f7 evas: Evas_3D - add .eet export/import
Summary: The first version of .eet format is added. All changes due to discussion in D1307 are done.

Reviewers: artem.popov, se.osadchy, reutskiy.v.v, Hermet, raster, cedric, Oleksander

@feature

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-10-06 16:47:25 +02:00
Dmytro Dadyka 0d2f4dbc11 [Evas/evas-3d] Add shadow maps. Added two scene-API functions for enable and disable shadows on the scene. Added 6 light-API function for set and get the light projection.
Reviewers: raster, cedric, Hermet

Subscribers: raster, cedric

Differential Revision: https://phab.enlightenment.org/D1330
2014-09-03 21:19:16 +09:00
Jaehyun Cho b3d900e748 evas: Fix not to clean and re-render if position of object enabled map is changed
Summary: Fix not to clean and re-render if the position of an object enabled map is changed.

Reviewers: raster, cedric, Hermet

Reviewed By: Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1220
2014-08-07 15:32:40 +09:00
Dmytro Dadyka 8e496570a7 evas: Evas_3D - add fog effect. add two API function for enable and disable fog effect for given mesh.
Reviewers: Hermet, raster, cedric

CC: cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-07-07 19:26:48 +02:00
Jean-Philippe Andre d0d9dbfdba Evas: Add encoding parameter to the savers
ecore_evas_convert: Add -e/--encoding option

This uses directly the encoding parameter.
For now, used only by the TGV saver, but there is no other way
to specify between ETC1 and ETC2. And we don't have a mixed ETC1+2
mode (yet).

@feature
2014-06-13 16:05:48 +09:00
Bogdan Devichev 700f4396e1 evas: Evas_3D - add .obj export/import.
@feature

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

CC: cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-06-05 20:49:26 +02:00
Guillaume Friloux a3e58b7618 Add prototype of evas_3d_mesh_aabb_add_to_frame for evas_3d_mesh_loader_md2.c 2014-05-30 11:50:02 +02:00
Tom Hacohen c58b3401c3 Eo/evas events: Move legacy events dynamic generator to eo. 2014-05-28 12:28:17 +01:00
Oleksandr Shcherbina e47373aee1 [evas/evas-3d] Add OBB and AABB.
Summary: Add axis-aligned bounding box (AABB) to frame. Set and update AABB and oriented bounding box (OBB) in node.

Reviewers: Hermet, cedric, raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D881
2014-05-27 22:07:29 +09:00
Cedric Bail 53a9fcf301 evas: remove Evas_3D legacy API. 2014-04-25 19:29:08 +02:00
ChunEon Park 7b31d84977 evas/evas3d: keep the code style. 2014-04-25 17:35:10 +09:00
ChunEon Park 433699e976 evas/evas3d: cleanup docs and removed unncessary files.
Conflicts:

	src/lib/evas/Evas_Legacy.h
2014-04-25 17:34:11 +09:00
subhransu ac7cea1eb8 Evas_3D : Eolian change for Evas_3D_Object.
Conflicts:

	src/lib/evas/Evas_Eo.h
2014-04-25 17:01:04 +09:00
subhransu e84e28fc22 Evas_3D : Eolian change
Conflicts:

	src/Makefile_Evas.am
	src/lib/evas/Evas_3D.h
	src/lib/evas/Evas_Eo.h
2014-04-25 16:58:47 +09:00
Taekyun Kim 8fda631730 Evas: 3D: Introducing 3D scene rendering features
Enable 3D features using --enable-evas-3d=yes when configuring.
APIs are exposed through Evas_3D.h.
Currently, evas-3d is being supported only on gl_x11 engine.

Conflicts:

	src/lib/evas/Evas_Eo.h
2014-04-25 16:15:41 +09:00
Jean-Philippe Andre 54fb9b2346 Evas: Use Evas_Colorspace to declare cspace
Why use int when we have a proper type?
All these APIs are internal.
2014-04-15 18:50:37 +09:00
Gwanglim Lee ca443ac152 Fixed a problem with e wl server that sent invalid key value to wl client.
Summary:
This problem occurred due to xkb_keysym_t value of libxkbcommon by e wl server.
e wl server should pass keycode from evdev input device on to wl client.
In order that e wl server receives valid keycode Ecore_Event_Key should have
an extended data member. This patch should be applied with server side patch.

@fix

Test Plan: run e wl server -> create wl client -> type keys

Reviewers: raster, devilhorns, zmike

CC: cedric

Differential Revision: https://phab.enlightenment.org/D712
2014-04-14 09:41:43 -04:00
Daniel Zaoui 2de5aaefac Eolian: remove Eo API defined in evas_private.h
We don't need it more because Eolian generates it already.
2014-04-02 14:27:48 +03:00
Jean-Philippe Andre 59f5216391 Evas gl_x11: Add support for glReadPixels
This will be needed by the filters for proxy rendering,
for textures and maps (displacement).

Add new engine functions to unleash the (sluggish) power of glReadPixels.
The idea is to be able to bypass glReadPixels later, so 3 new APIs are
added:
- surface_lock
- surface_read_pixels
- surface_unlock
They must be called in that order.

Note (for history):
glReadPixels was always getting the wrong data during first draw,
but the right data during a redraw...
Why? Well simply because for OpenGL itself, the image had never
been drawn in teh first place! Only the Evas GL context knew
about the image drawing, as it was queued somewhere in the pipe.

One line solution: Call evas_gl_common_context_flush before
doing anything else.
2014-03-07 11:07:09 +09:00
Tom Hacohen 19cde8f194 Evas font: Added support for the freetype spacing tag.
This doesn't work nicely, as for some reason fontconfig doesn't work
nicely with ':spacing=mono' without a font name.
Doesn't work with fc-match either. It does work with fc-list, but that's
not what we'd like to use. It could be just an issue with my local
fontconfig configuration.

This fixes T865 although the problem is now with freetype.
2014-01-29 14:36:22 +00:00
ChunEon Park a76e751eb4 evas - fixed side effect caused by f4d24e962d
since the map_changed is reset right after the map is updated,
it could not decide to redraw the map surface properly.

now map_update() returns the value to redraw the map surface properly.
2014-01-06 13:54:58 +09:00
Daniel Zaoui 208c424238 Evas: Add API to access private function
We need a function in DnD for the overlapping feature to retrieve all
the objects at a specific position.
A private function exists in Evas (evas_event_objects_event_list) for
that purpose.
We need an access to this function for Elementary but we don't
want the is_frozen flag to be checked.
2013-10-21 19:03:24 +03:00
Rafael Antognolli d1c6266c45 evas/image: Delay some video overlay operations.
If we are running on async render, some operations must be delayed, so
they will happen at the same time that the canvas rendering result gets
updated on the window/surface.
2013-10-04 18:26:57 -03:00
Ulisses Furquim 0af10ae93f evas/render: improve evas_render_sync()
Tracking only the async rendering canvases and just waiting for the last one
to finish rendering. This should be enough to sync all canvases since the
render thread orderly executes the commands.
2013-09-03 01:52:38 -03:00
Ulisses Furquim 31b1cc6e3e evas/render: introduce evas_render_sync().
evas_render_sync() will loop through all canvases and wait for their
rendering to finish. Since this function will execute from the main
thread that will sync all of them.
2013-09-02 19:41:32 -03:00
Cedric Bail bcb9ccb129 evas: let's allow intercept of other type of operation on the same object during an intercept. 2013-08-29 14:25:23 +09:00
Cedric Bail 1ac1db596f evas: add interceptor for focus_set. 2013-08-29 11:21:20 +09:00
Cedric Bail dc97ae0937 evas: reduce memory footprint. 2013-07-11 16:16:25 +09:00
Cedric Bail 48b40640b5 evas: no need to call eo_data_scope_get in many case after this change.
Reduce CPU usage by 5% in some case (especially when the CPU is not the
limiting factor like with the GL backend).
2013-07-09 09:48:09 +09:00
ChunEon Park 5f4ae9abeb evas/render - refactoring about checking smart member changed.
move those code to the evas_object_smart.
2013-07-02 15:28:56 +09:00
Cedric Bail e888a07c0a evas: cleanup headers. Should work on windows. 2013-06-26 11:24:29 +09:00
Sung W. Park 8e6f0aa11c Evas: add partial rendering support for evasgl direct rendering
Evas_GL Direct rendering is an optimization path that renders
directly to the window if conditions are met.  Because evas gl
backend used to re-render the entire screen, evas_gl direct
rendering didin't have to concern with partial region rendering.
Now that partial rendering/swapping has been applied to evas gl-
backend, evas_gl direct rendering also had to take into account
clip regions. in order to properly apply it, some adjustments
were made to the engine functions and etc.
2013-06-17 18:32:00 +09:00
Sung W. Park 316be3e6c7 Revert "Saving evasgl direct partial rendering fix temporarily"
This reverts commit e6359132de.
2013-06-17 18:22:15 +09:00
Sung W. Park e6359132de Saving evasgl direct partial rendering fix temporarily 2013-06-17 17:52:16 +09:00
Cedric Bail 1073084807 evas: change cache API to forward Eo object. 2013-06-14 16:38:18 +09:00
Cedric Bail 4d15a0f50f evas: add infra to block the main loop from evas.
PS: later on, I think we should just move evas to use Ecore infra
directly to create jobs and sync with the main loop.
2013-06-04 11:20:25 +09:00
ChunEon Park 11b43dad4b evas - fixed source clip. If the source object is a evas primitive object, then proxy won't clipped by proxy clipper itself. 2013-05-31 20:29:18 +09:00
Sung W. Park 97806103eb evas: fix evas flushing its command queue to wrong gl context in gl-backends
For native surface rendering (glX, egl) in gl-backend,  if pixel get callback
function is called for native rendering, there is a case where evas will
try to call evas_gl_common_context_flush() to flush its remaining commands
in its command queue while the context is set current to the native surface/
context that is called within the pixel get callback.  So, I've added an
engine function that forces a flush before it enters the pixel get callback
function.
2013-05-13 14:12:36 +09:00
Rafael Antognolli cf9d3c90f5 Ecore/Evas: Add evas_event_input_multi_down/up().
These events (from multi-touch) also have information about the mouse
pointer position, so they must be translated by the framespace too.
2013-05-08 16:50:15 -03:00
Cedric Bail d833244100 evas: add infrastructure to open from Eina_File. 2013-05-08 18:17:00 +09:00
Cedric Bail c3f9d3b8b8 evas: Make Evas_Loader API public. 2013-05-08 18:16:59 +09:00
Cedric Bail 0d2c6481b8 evas: final cleanup of the API, should be ready to make it public by now. 2013-05-06 19:02:05 +09:00
Cedric Bail 6929386895 evas: now move eina_file also out of the frame_duration API. 2013-05-06 19:02:05 +09:00
Cedric Bail 7d83e42046 evas: move evas cache API outside of the image data loader API. 2013-05-06 19:02:04 +09:00
Cedric Bail 6f802ab234 evas: start work on making the loader module a public API.
Goal is to be able to remove all internal Evas call from inside all
loader module. To do so we are going to open and hold a reference to the
file from outside of the module, read the header, create the image data,
load the data, close that reference.

Once that done, the next step is to let the file remain open as soon as
the filename/key is set and add an API to set an Eina_File directly. This
way edje can maintain the same file open as it use for an edje object,
keeping things in sync and avoid rendering glitch during update.
2013-05-06 19:02:04 +09:00
Daniel Zaoui 3d5136e4cc Efl: adapt legacy Evas callbacks to Eo callbacks mechanism. 2013-05-05 14:32:24 +03:00
Rafael Antognolli f490c4e5aa evas/events: Add evas_event_input_multi_move().
Same as evas_event_input_mouse_move, but for multi_move.
2013-05-03 17:19:13 -03:00
Rafael Antognolli f09e493bc2 evas/events: Add evas_event_input_mouse_move().
This function should be used internally by the input system
(Ecore_Evas_Input) to feed Evas with move events. The x,y event info is
relative to the base of the window/surface, instead of the 0,0 of the
canvas.

This case only happens for now under Wayland, where the 0,0 of the
canvas is translated due to the window decorations that are drawn by the
client.
2013-05-03 16:45:33 -03:00
Rafael Antognolli 4268bf9961 Revert "evas/map: Consider framespace offset when populating map points."
This reverts commit 3e43ad338d.
2013-04-29 11:29:43 -03:00
ChunEon Park 9fc2835cf4 evas - add evas_object_image_source_clip_set()/get() 2013-04-29 15:30:37 +09:00
ChunEon Park 911790b236 evas - fixed logic fault in proxy clipping. 2013-04-26 20:05:46 +09:00
ChunEon Park 188c345b27 evas - For compatibility, Make proxy's source clip to be optional. Im checking partal code for zmike. 2013-04-26 17:19:50 +09:00