Commit Graph

213 Commits

Author SHA1 Message Date
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 8b889f4892 Evas masking: Fix blending of some border images 2015-01-23 17:24:51 +09:00
Cedric BAIL 201df16d67 evas: reorder structure to avoid structural hole. 2015-01-20 18:46:03 +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 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
ChunEon Park 215b52ecc1 evas/map : set antialias context for map rendering. 2014-11-26 12:22:55 +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 792ac17736 Evas image: Use macros ENFN/ENDT to improve code readability
These macros replace some very repetitive code:
 - define ENFN obj->layer->evas->engine.func
 - define ENDT obj->layer->evas->engine.data.output

This commit includes lots of space changes as well.
This is a purely cosmetic commit.
2014-11-12 16:52:52 +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
Tae-Hwan Kim e96576cbc3 evas: Use Eina_Bool
Summary: Use EINA_TRUE/EINA_FALSE instead of 1, 0

Reviewers: raster, cedric, Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1633
2014-11-03 20:27:56 +09:00
Cedric BAIL c3b4a573a2 evas: fix increased memory usage in Evas.
Eina_Cow does memory comparison during standby time. So in expedite as we don't
have any standby time, we end up allocating some vast amount of memory that
will never be compared. It is way simpler to compare that the data are not
going to change before hand. It should also reduce the CPU consumed during
idle time.

This patch save about 1MB of data at peak time in expedite.
2014-10-29 06:15:11 +01: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 b5ccb00ba7 Evas filters: Feed some cow to the image objects
Same as for the text objects.
Fixes T1725.

Cedric, please run again your memory test, please.
2014-10-22 13:00:20 +09:00
Jean-Philippe Andre 9a0e128f23 Evas GL: Enable direct rendering even with alpha images 2014-10-20 12:16:08 +09:00
Tom Hacohen a7560dbc61 Eo: Change eo_add/del/unref behaviour.
Before this change eo_add() used to create an object with 1 ref, and if
the object had a parent, a second ref.
Now, eo_add() always returns an object with 1 ref, and eo_add_ref()
    preserves the old behaviour (for bindings).

eo_unref now un-parents if refcount is 0, and eo_del() is an alias for
eo_unref (will change to be a way to ensure an object is dead and goes
        to zombie-land even if still refed).
2014-09-25 17:38:45 +01:00
Mike Blumenkrantz 5375e154fe fix config.h inclusion across the tree 2014-09-23 15:56:46 -04: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
Tom Hacohen 69219fe1e2 Efl interface: Add image interface and start using it. 2014-08-21 11:02:11 +01:00
Tom Hacohen 500c4019dd Interface file: Update file interface and use it for image. 2014-08-21 11:02:11 +01:00
Carsten Haitzler faaaf55f7a evas images - animated gifs
there are deep down bugs in evas with animated gifs. espeically if you
have multiple instances of the same gif, but for now let's just
address the problem where we have entire frames of animation
vanishing. this is because the animation frame set failed and thus
didnt notify the rest of evas. have it ignore this fail for now so
things work out.
2014-08-18 18:01:51 +09:00
ChunEon Park b179c1d82e evas/proxy: When src object has no proxies, redraw flag is set for EINA_FALSE.
[Problem] When obj which has src object(proxy concept) are excluded from render_object,
src object's 'proxy.redraw' isn't change although src obj have not proxies.
because 'proxy.redraw' flag is changed to EINA_FALSE only in obj's subrender() called.

[Resolution] When the count of source obj's proxies is 0, src obj's 'proxy.redraw' is set for EINA_FALSE.

Signed-Off-By: Min Kyoung Kim <mer.kim@samsung.com>
2014-08-14 15:29:26 +09:00
Tom Hacohen 7f3a44894b Evas canvas eolian: Fix namespace and class name for the evas canvas. 2014-06-30 17:47:06 +01:00
Jean-Philippe Andre 10e8b72667 Evas: Fix potential memory leak (save with encoding) 2014-06-18 16:28:37 +09: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
Tom Hacohen 0fc3279db9 Efl: Update code to use the new class names generated by eolian. 2014-06-03 11:28:01 +01:00
ChunEon Park d497cd4364 evas/evas3d: reset image properies if the image is used for scene. 2014-05-12 19:55:47 +09:00
Cedric Bail d8652193fc evas: fix uninitialized value being used when the engine doesn't support Evas_3D.
CID 1211988
2014-05-10 11:44:57 +02:00
ChunEon Park a5b89f17b3 evas - removed stdlib.h math.h header include in each source files.
It's included in the evas_common_private.h.
2014-05-07 16:33:23 +09:00
ChunEon Park 8e9657ebb6 evas/evas3d: don't be crash when it's running on sw backened.
It doesn't have a plan that evas3d supports sw backened in the near future,
let it prenvent engine function access in case of sw backened.
2014-05-07 16:23:53 +09:00
ChunEon Park fac0ab79b0 evas/evas3d: exceptional handling if a camera doesn't set to a scene. 2014-04-30 20:24:20 +09:00
ChunEon Park c399017cef evas - removed unncessary header include
it's already done in evas_common_private.h. no need it in each file.
2014-04-29 15:44:29 +09:00
Jean-Philippe Andre ed0ac9fec7 Evas image: Gracefully handle filter failures
Add proper callback and mark filter as invalid in case of failure.
This might still trigger a redraw.
2014-04-27 17:41:40 +09:00
Jean-Philippe Andre ee840eecd1 Evas image: Skip draw when the image size is < 0 due to filter padding
If the Image Object size is smaller than the required padding,
nothing should be drawn, so just skip it.
2014-04-27 17:41:40 +09:00
Jean-Philippe Andre 89acf9cf28 Evas image: Add read-only property filter_padding
Returns l, r, t, b and true/false if the filter is used & valid.
2014-04-27 17:41:40 +09:00
Jean-Philippe Andre fe0f7566d5 Evas filters: Fix image with filters using fill mode
Depending on the "filled" flag, adjust how the image is filtered.
Filled: take padding into account and zoom out original image if needed
Non filled: we're tiling anyways, so padding doesn't have any meaning
2014-04-27 17:41:40 +09:00
Jean-Philippe Andre 223e1258c1 Evas filters: Quick redraw using output buffer
In Image_Object, reuse the previous output buffer if it is
still valid (image didn't change, etc...).
2014-04-27 17:41:40 +09:00
Jean-Philippe Andre 59cf013db9 Evas filters: Add support for Evas_Object_Image
This adds filter support to Image objects as well.
The exact same filters can run on Text and on Images
(provided some colorspace limitations are respected).

This basically adds:
- Support for RGBA input buffer
- Eo entry points for Image filter support
- Implement basic filter support in Evas_Image
2014-04-27 17:41:40 +09:00
Cedric Bail 53a9fcf301 evas: remove Evas_3D legacy API. 2014-04-25 19:29:08 +02:00
ChunEon Park 57360fdf20 evas/image - fixed typo 2014-04-25 20:10:46 +09:00
ChunEon Park 5fbd7b6f0f evas/image - fill up a missed initial value in the image state. 2014-04-25 20:01:26 +09:00
ChunEon Park 60cfdc4b4f evas/evas3d: rename 3d_scene_set()/get() to scene_set()/get()
if eolian generates c++ apis, the method name will be started with

numberic character that wont' be accepted by c++ language.

so renamed.
2014-04-25 19:53:18 +09:00
ChunEon Park a023d3f9b9 evas/evas3d: just cleanup image code.
changed to clean efl style.
2014-04-25 17:34:53 +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
Subhransu Sekhar Mohanty f7503e61ac Evas: 3D: Change the api name from t3d_scene to 3d_scene as the eolian issue got fixed. 2014-04-25 16:47:32 +09:00
Taekyun Kim 6856e562ca Evas: 3D: Refined proxy texture implementation
Added new APIs for controlling source object's visibility.
Fixed bugs related to updating proxy textures.
2014-04-25 16:20:24 +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
Carsten Haitzler 04a6f45756 remove unused code 2014-04-16 15:22:42 +09:00
Tom Hacohen 35525a53e0 Adjust eo_do calls to work with the eo2 api. 2014-04-10 04:20:21 +01:00
zmike e5d207fc25 +evas_object_image_mmap_get() 2014-03-31 09:51:00 -04:00
ChunEon Park b2070f8c39 evas/proxy - redraw proxy source properly.
This patch fixes the proxy drawing problem that source won't be updated in some case

If the image object is the one member of the smart that has the proxy,
the proxy(image part) won't be redrawed properly unless evas tries to draw the image object.
This can be heppend if the image object is inactive cause of some reasone(ie. outside of the screen)
So, the proxy object never can be never updated even the image part is changed.
Now let try to be active if the parent is both active and source object.

and revert previous change with regarded to a739716cee,
that's no more required now.

@fix
2014-03-27 15:47:00 +09:00
Jean-Philippe Andre 079e5d3692 Evas image: Improve diagrams in comments
Purely non functional change, for readability :)
2014-03-20 11:13:32 +09:00
Daniel Zaoui 6fd341a449 Eolian: Fix ctor/dtor generation 2014-03-19 07:04:28 +02:00
Cedric BAIL d8914689d4 evas: let's check NULL for destination object to.
Fix CID 1191976.
2014-03-14 11:44:49 +09:00
Yossi Kantor 2219b5434c Eolian: Integration of Evas Image 2014-03-13 09:14:14 +02:00
Daniel Zaoui 103e89a04a Eolian: Integration of Evas 2014-03-12 10:57:28 +02:00
ChunEon Park a739716cee evas/image - update dirty region in the render time.
this fixes the proxy rendering that sub object of the source couldn't be dirty region set.

since the object could be invisible nor won't be pre-rendered neither.

Im supposing the mapped(proxy) object rendering sequence should be totally refactored

that should be separated with the normal rendering sequence.

Until that, this change will be alternative solution.
2014-02-17 23:05:36 +09:00
Jean-Philippe Andre 712566939d Evas filters: Add proxy source only once
If the proxy has already been added to the list of
proxy sources, don't add it again. This is for the filters
case where unset isn't even called :)
2014-02-07 17:33:17 +09:00
Daniel Juyung Seo 76d8532b54 efl: Unified eina critical manro to CRI.
Being annoyed by different types of eina critical macros - CRI, CRIT,
 CRITICAL -, I concluded to unify them to one. Discussed on IRC and
 finally, CRI was chosen to meet the consistency with other macros -
 ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
2013-12-26 12:27:13 +09:00
ChunEon Park 0d9826919f evas/image - init default image state value explicitly. 2013-11-11 14:25:43 +09:00
ChunEon Park 76c7b9a275 evas/image - fixed typo. 2013-11-09 17:07:58 +09:00
ChunEon Park cdf56cbdae evas/image - removed dead code. 2013-11-08 19:48:37 +09:00
ChunEon Park 6f93d61b19 evas - removed dead code. 2013-11-08 19:22:12 +09:00
Tom Hacohen c7addf4083 Changed Eo class names to be consistent.
All the class names are now of the format: Lib_Type_Subtype_Extra.
2013-11-07 11:17:52 +00:00
Cedric Bail c179335b1f evas: update use of eina_cow_free for latest change. 2013-11-04 12:47:48 +09:00
Cedric Bail f4ae52ea67 evas: make mmap_set use const Eina_File. 2013-11-04 11:27:59 +09:00
ChunEon Park 69077d19d7 evas/proxy - decide the proxy updation in the main render process.
because the proxy updation is decided in the proxy rendering time,

it couldn't be updated at the time if the source is changed before.
2013-10-31 17:04:23 +09:00
Jean-Philippe Andre 1e82480c9a evas/cserve2: Use scalecache with cserve2
Let's reuse the logic from scalecache and call cserve2
functions when the scalecache should be used.
So, now, cserve2 server will not scale any image... This is
too computationally intensive for the server's main thread.

This is not optimal but makes a hell of a lot more sense for
the moment. (since cserve2 manages the SHM segments)
2013-10-28 15:47:15 +09:00
Carsten Haitzler 9f690ba390 evas - cover corner case for native surface shared refs on obj delete 2013-10-28 10:26:32 +09:00
Carsten Haitzler a01ba5718d evas - small buglet. image size of up to but NOT including 32768 are valid 2013-10-14 12:41:28 +09:00
Rafael Antognolli 9506fd5db7 evas/image: Add video surface caps.
Wayland subsurfaces can be used as video surfaces too, similarly to
Ecore_X windows. However, they support a different set of features. Some
of them, like subsurface clipping and scaling, might be added in the
future, but so far we must work with what we have.

This commit allows to set an enum bitfield to the Video_Surface, with
the default value being one that will keep the same behavior as before,
for Ecore_X window. Thus, backward compatibility should not be broken.

It's possible to inform Evas that the surface in question is not able to
resize or scale, or that it's above or below the original canvas
surface. This allows Evas to show the surface itself, or use a buffer of
pixels instead, when the capabilities are not available.
2013-10-04 18:28:51 -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
Rafael Antognolli 22f9a6e8f0 evas/image: Take framespace into account when moving video surface. 2013-10-04 18:23:58 -03:00
Tom Hacohen 682c69764d Revert "eo: libs,test,benchmarks Eo_Class -> Eo"
This reverts commit 1714fe93f4.

We actually want this type, it makes things clearer.

Conflicts:
	src/tests/eo/function_overrides/function_overrides_inherit2.c
	src/tests/eo/function_overrides/function_overrides_simple.c
	src/tests/eo/suite/eo_test_class_simple.c
2013-09-27 16:40:32 +01:00
Jérémy Zurcher 1714fe93f4 eo: libs,test,benchmarks Eo_Class -> Eo
Conflicts:
	src/tests/eo/suite/eo_test_general.c
2013-09-27 14:01:46 +01:00
Cedric Bail b37494503f evas: update to new eo_parent_get/set API. 2013-09-25 13:34:18 +09:00
Cedric Bail 2b68a31252 evas: handle gracefully move from evas_object_image_file_set to and from evas_object_image_mmap_set. 2013-08-12 12:12:13 +09:00
Chris Michael 5ccf87c845 Remove unused variables.
Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-08-11 14:02:21 +01:00
Carsten Haitzler 1e9d4bf28f evas - fix up border adjust improvement from last night. handles overlap now 2013-08-10 16:26:30 +09:00
Carsten Haitzler a18bdfc19f evas - OOPS! printf was not meant to go in! 2013-08-09 22:30:14 +09:00
Carsten Haitzler 9b8f67ec4d evas - minor visual fixup with impossible border scaling to be more sensible 2013-08-09 22:07:06 +09:00
Cedric Bail 861823848a eina: change eina_file_virtualize to be able to provide a fake name. 2013-08-09 20:50:54 +09:00
Cedric Bail a07fab03e8 evas: CRIT when someone change object geometry during pixels get callback. 2013-08-08 09:47:45 +09:00
Cedric Bail e0b8e3f5e7 evas: use eina_file_virtualize() in evas_object_memfile_set().
NOTE: I am tempted to mark evas_object_memfile_set() as deprecated due
to the forced memcpy it introduced and the fact that it is now a 3 lines
of code to do the same in a more efficient way.
2013-07-31 11:53:39 +09:00
Cedric Bail 847efe7cdb evas: let's return the correct file name. 2013-07-24 15:50:09 +09:00
Jiyoun Park 75a39b02bd * Evas: fix infinite loop if app use ecore evas image
app have to call update add function after object data set
2013-07-23 17:01:36 +09:00
Cedric Bail dce0fbcb84 evas: let's get the pixels if the image is dirty, not only when we do already have pixels. 2013-07-15 19:12:02 +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 627beaae71 evas/proxy rendering - optimize proxy rendering.
re-render proxies if sources are changed. this patch increases the proxy rendering up to 2x.
2013-07-02 15:38:42 +09:00
Carsten Haitzler 6828cf2e29 evas: efl 1.8 dev bug only... update add bug in image objects throws away some updates. 2013-06-28 17:26:14 +09:00
Sebastian Dransfeld 336f6ec328 efl: formatting 2013-06-20 13:28:18 +02:00
Sebastian Dransfeld 51023d2d4f evas: Keep sane name for public header
Evas_Common.h should be used for the public header, and rather rename
evas_common.h internal header to another name.

Sa:
Evas_Common_Header.h -> Evas_Common.h
evas_common.h -> evas_common_private.h

Shouldn't have both Evas_Common.h and evas_common.h because of case
insensitive filesystems.
2013-06-20 12:53:29 +02: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 62e146f2fc Revert "Touch for evas gl direct rendering partial rendering/swap fix."
This reverts commit 382ffbb4f5.
2013-06-17 18:22:04 +09:00
Sung W. Park 382ffbb4f5 Touch for evas gl direct rendering partial rendering/swap fix. 2013-06-17 17:52:16 +09:00
Sung W. Park e6359132de Saving evasgl direct partial rendering fix temporarily 2013-06-17 17:52:16 +09:00
Jean-Philippe Andre 19fb35d657 evas/cserve2: Close scaled images after drawing 2013-06-14 16:38:18 +09:00
Jiyoun Park f488cf2b4d Evas: Fix bs if app call image object update add after call api like
fileset.
2013-06-13 14:09:28 +09:00